freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][master] * graph/grobjs.* (grAlloc): Retur


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype-demos][master] * graph/grobjs.* (grAlloc): Return void pointer.
Date: Thu, 08 Sep 2022 03:35:19 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs

Commits:

  • 7bf181da
    by Alexei Podtelezhnikov at 2022-09-07T23:33:24-04:00
    * graph/grobjs.* (grAlloc): Return void pointer.
    

2 changed files:

Changes:

  • graph/grobjs.c
    ... ... @@ -76,16 +76,16 @@
    76 76
       *   size  :: size in bytes of the requested block
    
    77 77
       *
    
    78 78
       * <Return>
    
    79
    -  *   the memory block address. 0 in case of error
    
    79
    +  *   the memory block address. NULL in case of error
    
    80 80
       *
    
    81 81
       ********************************************************************/
    
    82 82
     
    
    83
    -  unsigned char*
    
    83
    +  void*
    
    84 84
       grAlloc( size_t  size )
    
    85 85
       {
    
    86
    -    unsigned char*  p;
    
    86
    +    void*  p;
    
    87 87
     
    
    88
    -    p = (unsigned char*)malloc(size);
    
    88
    +    p = malloc(size);
    
    89 89
         if (!p && size > 0)
    
    90 90
         {
    
    91 91
           grError = gr_err_memory;
    

  • graph/grobjs.h
    ... ... @@ -93,11 +93,11 @@
    93 93
       *   size  :: size in bytes of the requested block
    
    94 94
       *
    
    95 95
       * <Return>
    
    96
    -  *   the memory block address. 0 in case of error
    
    96
    +  *   the memory block address. NULL in case of error
    
    97 97
       *
    
    98 98
       ********************************************************************/
    
    99 99
     
    
    100
    -  extern unsigned char*
    
    100
    +  extern void*
    
    101 101
       grAlloc( size_t  size );
    
    102 102
     
    
    103 103
     
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]