summaryrefslogtreecommitdiff
path: root/include/Exceptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/Exceptions.h')
-rw-r--r--include/Exceptions.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/Exceptions.h b/include/Exceptions.h
index 090ace9..e72a8a2 100644
--- a/include/Exceptions.h
+++ b/include/Exceptions.h
@@ -34,10 +34,11 @@
class GeneralException;
-char * xstrdup(const char *) throw (GeneralException);
-void * xmalloc(ssize_t) throw (GeneralException);
+char * xstrdup(const char *);
+void * xmalloc(size_t) throw (GeneralException);
void xfree(void *&);
-void * xrealloc(void *, size_t) throw (GeneralException);
+void * xrealloc(void *, size_t);
+int xpipe(int *, int = 0) throw (GeneralException);
// On prédéfinit la classe String, pour éviter
// les deadlocks de compilation...
@@ -54,6 +55,9 @@ class Base {
static void * realloc(void * p, size_t s) {
return xrealloc(p, s);
}
+ static void * calloc(size_t n, size_t s) {
+ return xmalloc(n * s);
+ }
void * operator new(size_t s) {
return xmalloc(s);
}
@@ -69,6 +73,9 @@ class Base {
static void free(char *& p) {
xfree((void *) p);
}
+ static int pipe(int * p, int flag = 0) {
+ return xpipe(p);
+ }
};
class GeneralException : public Base {