[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Users-prolog Digest, Vol 70, Issue 3
From: |
Duncan Patton a Campbell |
Subject: |
Re: Users-prolog Digest, Vol 70, Issue 3 |
Date: |
Fri, 13 Feb 2009 19:46:57 -0700 |
On Sat, 14 Feb 2009 00:49:15 +0100
Daniel Diaz <address@hidden> wrote:
> Duncan,
>
> I have cleaned a lot gprolog.h. malloc and friends have few to do with
> gprolog. However, I'm okay to add this except if __GPROLOG_FOREIGN_STRICT__
> is specified (see gprolog.h for more on this).
>
Hi Daniel,
Yes, malloc is not a normal prolog thing,
but I use it in various bits of interface glue.
I've put it immediately after the
#ifndef __GPROLOG_FOREIGN_STRICT__
line.
Thanks,
Dhu
> Daniel
>
> Duncan Patton a Campbell a écrit :Addit..
>
> Hacking the lines
>
> char *Pl_Malloc_Check(unsigned size, char *src_file, int src_line);
>
> char *Pl_Calloc_Check(unsigned nb, unsigned size, char *src_file,
> int src_line);
>
> char *Pl_Realloc_Check(char *ptr, unsigned size, char *src_file, int
> src_line);
>
> char *Pl_Strdup_Check(char *str, char *src_file, int src_line);
>
> #define Malloc(size) Pl_Malloc_Check(size, __FILE__, __LINE__)
>
> #define Calloc(nb, size) Pl_Calloc_Check(nb, size, __FILE__, __LINE__)
>
> #define Realloc(ptr, size) Pl_Realloc_Check(ptr, size, __FILE__, __LINE__)
>
> #define Free(ptr) free(ptr)
>
> #define Strdup(str) Pl_Strdup_Check(str, __FILE__, __LINE__)
>
> into gprolog.h appears to do the trick.
>
> Will this be appearing in later versions of gprolog.h or is some other way
> prefered?
>
> Thanks,
>
> Dhu
>
>
> On Tue, 10 Feb 2009 12:00:30 -0500
> address@hidden wrote:
>
> I have just released version 1.3.1. Changes wrt 1.3.0 are as follows:
>
>
> Howdy?
>
> I've been unable to locate a PL(?)_Malloc and am wondering if this has
> been subsumed into some other functionality.
>
> Dhu
>
>
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/users-prolog
>
>
- Re: Users-prolog Digest, Vol 70, Issue 3, Antonio Maschio, 2009/02/10
- Re: Users-prolog Digest, Vol 70, Issue 3, Duncan Patton a Campbell, 2009/02/11
- Re: Users-prolog Digest, Vol 70, Issue 3, Duncan Patton a Campbell, 2009/02/13
- Re: Users-prolog Digest, Vol 70, Issue 3, Duncan Patton a Campbell, 2009/02/13