freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] Minor editing of last commit; formattin


From: Werner Lemberg
Subject: [Git][freetype/freetype][master] Minor editing of last commit; formatting.
Date: Sat, 13 Feb 2021 06:50:57 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1 1
     2021-02-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2 2
     
    
    3
    -	Decorate qsort callbacks with cdecl.
    
    3
    +	Decorate `qsort` callbacks with `cdecl`.
    
    4 4
     
    
    5 5
     	* include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF):
    
    6 6
     	Add new macro.
    
    7
    +
    
    7 8
     	* src/base/ftrfork.c, src/bdf/bdflib.c, src/gxvalid/gxvcommn.c,
    
    8
    -        src/psaux/afmparse.c, src/psnames/psmodule.c, src/type1/t1afm.c,
    
    9
    -        src/sfnt/sfwoff.c, src/sfnt/sfwoff2.c: Update qsort callbacks.
    
    9
    +	src/psaux/afmparse.c, src/psnames/psmodule.c, src/type1/t1afm.c,
    
    10
    +	src/sfnt/sfwoff.c, src/sfnt/sfwoff2.c: Update `qsort` callbacks.
    
    10 11
     
    
    11
    -	Fixes #1026 when compiling FreeType with an unusual calling convention
    
    12
    -	while the C library qsort still expects cdecl.
    
    12
    +	Fixes #1026 when compiling FreeType with an unusual calling
    
    13
    +	convention while the C library function `qsort` still expects
    
    14
    +	`cdecl`.
    
    13 15
     
    
    14 16
     2021-02-10  Dominik Röttsches  <drott@chromium.org>
    
    15 17
     
    

  • include/freetype/internal/compiler-macros.h
    ... ... @@ -216,74 +216,77 @@ FT_BEGIN_HEADER
    216 216
     #define FT_EXPORT_VAR( x )  FT_FUNCTION_DECLARATION( x )
    
    217 217
     #endif
    
    218 218
     
    
    219
    -  /* When compiling FreeType as a DLL or DSO with hidden visibility,   */
    
    220
    -  /* some systems/compilers need a special attribute in front OR after */
    
    221
    -  /* the return type of function declarations.                         */
    
    222
    -  /*                                                                   */
    
    223
    -  /* Two macros are used within the FreeType source code to define     */
    
    224
    -  /* exported library functions: `FT_EXPORT` and `FT_EXPORT_DEF`.      */
    
    225
    -  /*                                                                   */
    
    226
    -  /* - `FT_EXPORT( return_type )`                                      */
    
    227
    -  /*                                                                   */
    
    228
    -  /*   is used in a function declaration, as in                        */
    
    229
    -  /*                                                                   */
    
    230
    -  /*   ```                                                             */
    
    231
    -  /*     FT_EXPORT( FT_Error )                                         */
    
    232
    -  /*     FT_Init_FreeType( FT_Library*  alibrary );                    */
    
    233
    -  /*   ```                                                             */
    
    234
    -  /*                                                                   */
    
    235
    -  /* - `FT_EXPORT_DEF( return_type )`                                  */
    
    236
    -  /*                                                                   */
    
    237
    -  /*   is used in a function definition, as in                         */
    
    238
    -  /*                                                                   */
    
    239
    -  /*   ```                                                             */
    
    240
    -  /*     FT_EXPORT_DEF( FT_Error )                                     */
    
    241
    -  /*     FT_Init_FreeType( FT_Library*  alibrary )                     */
    
    242
    -  /*     {                                                             */
    
    243
    -  /*       ... some code ...                                           */
    
    244
    -  /*       return FT_Err_Ok;                                           */
    
    245
    -  /*     }                                                             */
    
    246
    -  /*   ```                                                             */
    
    247
    -  /*                                                                   */
    
    248
    -  /* You can provide your own implementation of `FT_EXPORT` and        */
    
    249
    -  /* `FT_EXPORT_DEF` here if you want.                                 */
    
    250
    -  /*                                                                   */
    
    251
    -  /* To export a variable, use `FT_EXPORT_VAR`.                        */
    
    252
    -  /*                                                                   */
    
    219
    +  /*
    
    220
    +   * When compiling FreeType as a DLL or DSO with hidden visibility,
    
    221
    +   * some systems/compilers need a special attribute in front OR after
    
    222
    +   * the return type of function declarations.
    
    223
    +   *
    
    224
    +   * Two macros are used within the FreeType source code to define
    
    225
    +   * exported library functions: `FT_EXPORT` and `FT_EXPORT_DEF`.
    
    226
    +   *
    
    227
    +   * - `FT_EXPORT( return_type )`
    
    228
    +   *
    
    229
    +   *   is used in a function declaration, as in
    
    230
    +   *
    
    231
    +   *   ```
    
    232
    +   *     FT_EXPORT( FT_Error )
    
    233
    +   *     FT_Init_FreeType( FT_Library*  alibrary );
    
    234
    +   *   ```
    
    235
    +   *
    
    236
    +   * - `FT_EXPORT_DEF( return_type )`
    
    237
    +   *
    
    238
    +   *   is used in a function definition, as in
    
    239
    +   *
    
    240
    +   *   ```
    
    241
    +   *     FT_EXPORT_DEF( FT_Error )
    
    242
    +   *     FT_Init_FreeType( FT_Library*  alibrary )
    
    243
    +   *     {
    
    244
    +   *       ... some code ...
    
    245
    +   *       return FT_Err_Ok;
    
    246
    +   *     }
    
    247
    +   *   ```
    
    248
    +   *
    
    249
    +   * You can provide your own implementation of `FT_EXPORT` and
    
    250
    +   * `FT_EXPORT_DEF` here if you want.
    
    251
    +   *
    
    252
    +   * To export a variable, use `FT_EXPORT_VAR`.
    
    253
    +   */
    
    253 254
     
    
    254 255
       /* See `freetype/config/compiler_macros.h` for the `FT_EXPORT` definition */
    
    255 256
     #define FT_EXPORT_DEF( x )  FT_FUNCTION_DEFINITION( x )
    
    256 257
     
    
    257
    -  /* The following macros are needed to compile the library with a   */
    
    258
    -  /* C++ compiler and with 16bit compilers.                          */
    
    259
    -  /*                                                                 */
    
    260
    -
    
    261
    -  /* This is special.  Within C++, you must specify `extern "C"` for */
    
    262
    -  /* functions which are used via function pointers, and you also    */
    
    263
    -  /* must do that for structures which contain function pointers to  */
    
    264
    -  /* assure C linkage -- it's not possible to have (local) anonymous */
    
    265
    -  /* functions which are accessed by (global) function pointers.     */
    
    266
    -  /*                                                                 */
    
    267
    -  /*                                                                 */
    
    268
    -  /* FT_CALLBACK_DEF is used to _define_ a callback function,        */
    
    269
    -  /* located in the same source code file as the structure that uses */
    
    270
    -  /* it.  FT_COMPARE_DEF, in addition, ensures the cdecl calling     */
    
    271
    -  /* convention on x86, required by the C library qsort.             */
    
    272
    -  /*                                                                 */
    
    273
    -  /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare   */
    
    274
    -  /* and define a callback function, respectively, in a similar way  */
    
    275
    -  /* as FT_BASE and FT_BASE_DEF work.                                */
    
    276
    -  /*                                                                 */
    
    277
    -  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
    
    278
    -  /* contains pointers to callback functions.                        */
    
    279
    -  /*                                                                 */
    
    280
    -  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
    
    281
    -  /* that contains pointers to callback functions.                   */
    
    282
    -  /*                                                                 */
    
    283
    -  /*                                                                 */
    
    284
    -  /* Some 16bit compilers have to redefine these macros to insert    */
    
    285
    -  /* the infamous `_cdecl` or `__fastcall` declarations.             */
    
    286
    -  /*                                                                 */
    
    258
    +  /*
    
    259
    +   * The following macros are needed to compile the library with a
    
    260
    +   * C++ compiler and with 16bit compilers.
    
    261
    +   */
    
    262
    +
    
    263
    +  /*
    
    264
    +   * This is special.  Within C++, you must specify `extern "C"` for
    
    265
    +   * functions which are used via function pointers, and you also
    
    266
    +   * must do that for structures which contain function pointers to
    
    267
    +   * assure C linkage -- it's not possible to have (local) anonymous
    
    268
    +   * functions which are accessed by (global) function pointers.
    
    269
    +   *
    
    270
    +   *
    
    271
    +   * FT_CALLBACK_DEF is used to _define_ a callback function,
    
    272
    +   * located in the same source code file as the structure that uses
    
    273
    +   * it.  FT_COMPARE_DEF, in addition, ensures the `cdecl` calling
    
    274
    +   * convention on x86, required by the C library function `qsort`.
    
    275
    +   *
    
    276
    +   * FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare
    
    277
    +   * and define a callback function, respectively, in a similar way
    
    278
    +   * as FT_BASE and FT_BASE_DEF work.
    
    279
    +   *
    
    280
    +   * FT_CALLBACK_TABLE is used to _declare_ a constant variable that
    
    281
    +   * contains pointers to callback functions.
    
    282
    +   *
    
    283
    +   * FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable
    
    284
    +   * that contains pointers to callback functions.
    
    285
    +   *
    
    286
    +   *
    
    287
    +   * Some 16bit compilers have to redefine these macros to insert
    
    288
    +   * the infamous `_cdecl` or `__fastcall` declarations.
    
    289
    +   */
    
    287 290
     #ifdef __cplusplus
    
    288 291
     #define FT_CALLBACK_DEF( x )  extern "C"  x
    
    289 292
     #else
    


  • reply via email to

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