1
0
mirror of https://github.com/meekrosoft/fff synced 2026-01-23 00:15:59 +01:00

Merge branch 'no_extern_c' of https://github.com/zrax/fff into zrax-no_extern_c

This commit is contained in:
James Fraser
2018-12-14 19:56:22 +11:00
4 changed files with 5193 additions and 5490 deletions

View File

@@ -271,23 +271,19 @@ def output_macro(arg_count, has_varargs, has_calling_conventions, is_value_funct
puts
output_macro_header(declare_macro_name, saved_arg_count, has_varargs, has_calling_conventions, return_type)
indent {
extern_c { # define argument capture variables
output_variables(saved_arg_count, has_varargs, has_calling_conventions, is_value_function)
}
output_variables(saved_arg_count, has_varargs, has_calling_conventions, is_value_function)
}
puts
output_macro_header(define_macro_name, saved_arg_count, has_varargs, has_calling_conventions, return_type)
indent {
extern_c {
putd_backslash "FUNCNAME##_Fake FUNCNAME##_fake;"
putd_backslash function_signature(saved_arg_count, has_varargs, has_calling_conventions, is_value_function) + "{"
indent {
output_function_body(saved_arg_count, has_varargs, is_value_function)
}
putd_backslash "}"
putd_backslash "DEFINE_RESET_FUNCTION(FUNCNAME)"
putd_backslash "FUNCNAME##_Fake FUNCNAME##_fake;"
putd_backslash function_signature(saved_arg_count, has_varargs, has_calling_conventions, is_value_function) + "{"
indent {
output_function_body(saved_arg_count, has_varargs, is_value_function)
}
putd_backslash "}"
putd_backslash "DEFINE_RESET_FUNCTION(FUNCNAME)"
}
puts
@@ -492,9 +488,9 @@ def define_fff_globals
}
putd "} fff_globals_t;"
puts
putd_backslash "FFF_EXTERN_C"
putd "FFF_EXTERN_C"
putd "extern fff_globals_t fff;"
putd_backslash "FFF_END_EXTERN_C"
putd "FFF_END_EXTERN_C"
puts
putd_backslash "#define DEFINE_FFF_GLOBALS"
indent {
@@ -520,14 +516,6 @@ def define_fff_globals
}
end
def extern_c
putd_backslash "FFF_EXTERN_C"
indent {
yield
}
putd_backslash "FFF_END_EXTERN_C"
end
def in_struct
putd_backslash "typedef struct FUNCNAME##_Fake {"
indent {