X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2Fgmem.h;h=e74d182231839e8f75a40c943286680e7ca8b434;hb=706eaa27c94e5ebd9912ffadeeaa0e4656e10bc3;hp=587e7fa43c9fd8c14eb1adc459f2369e0be83e3a;hpb=c7432833fe3a6469d63fad135151a92e12877b94;p=swftools.git diff --git a/pdf2swf/xpdf/gmem.h b/pdf2swf/xpdf/gmem.h index 587e7fa..e74d182 100644 --- a/pdf2swf/xpdf/gmem.h +++ b/pdf2swf/xpdf/gmem.h @@ -28,6 +28,15 @@ extern void *gmalloc(int size); extern void *grealloc(void *p, int size); /* + * These are similar to gmalloc and grealloc, but take an object count + * and size. The result is similar to allocating nObjs * objSize + * bytes, but there is an additional error check that the total size + * doesn't overflow an int. + */ +extern void *gmallocn(int nObjs, int objSize); +extern void *greallocn(void *p, int nObjs, int objSize); + +/* * Same as free, but checks for and ignores NULL pointers. */ extern void gfree(void *p);