mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
([NSString +initialize]): Cast function pointer.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@780 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b74458b94a
commit
97ceb69629
1 changed files with 11 additions and 3 deletions
|
@ -33,6 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <objects/stdobjects.h>
|
#include <objects/stdobjects.h>
|
||||||
|
#include <objects/Coding.h>
|
||||||
#include <Foundation/NSString.h>
|
#include <Foundation/NSString.h>
|
||||||
#include <Foundation/NSArray.h>
|
#include <Foundation/NSArray.h>
|
||||||
#include <Foundation/NSCharacterSet.h>
|
#include <Foundation/NSCharacterSet.h>
|
||||||
|
@ -92,8 +93,13 @@ static Class NSMutableString_c_concrete_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_REGISTER_PRINTF_FUNCTION
|
#if HAVE_REGISTER_PRINTF_FUNCTION
|
||||||
int handle_printf_atsign (FILE *stream, const struct printf_info *info,
|
#include <stdio.h>
|
||||||
va_list *ap_pointer)
|
#include <printf.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
int
|
||||||
|
handle_printf_atsign (FILE *stream,
|
||||||
|
const struct printf_info *info,
|
||||||
|
va_list *ap_pointer)
|
||||||
{
|
{
|
||||||
id string_object;
|
id string_object;
|
||||||
int len;
|
int len;
|
||||||
|
@ -122,7 +128,9 @@ int handle_printf_atsign (FILE *stream, const struct printf_info *info,
|
||||||
NSMutableString_c_concrete_class = [NSGMutableCString class];
|
NSMutableString_c_concrete_class = [NSGMutableCString class];
|
||||||
|
|
||||||
#if HAVE_REGISTER_PRINTF_FUNCTION
|
#if HAVE_REGISTER_PRINTF_FUNCTION
|
||||||
if (register_printf_function ('@', handle_printf_atsign, NULL))
|
if (register_printf_function ('@',
|
||||||
|
(printf_function)handle_printf_atsign,
|
||||||
|
NULL))
|
||||||
[self error: "register printf handling of %%@ failed"];
|
[self error: "register printf handling of %%@ failed"];
|
||||||
#endif /* HAVE_REGISTER_PRINTF_FUNCTION */
|
#endif /* HAVE_REGISTER_PRINTF_FUNCTION */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue