Permalink
Browse files

revert c2992da and 1fa3eba

  • Loading branch information...
1 parent 2ba4bd4 commit bc2c7fb18ca1ffa2465597ad1083d2380b140ec9 @Watson1978 Watson1978 committed Jun 28, 2011
@@ -17,5 +17,4 @@
have_header("ruby/re.h")
have_header("ruby/encoding.h")
end
-$INCFLAGS << ' -I../../..'
create_makefile 'json/ext/generator'
@@ -1315,24 +1315,6 @@ static VALUE cState_depth_set(VALUE self, VALUE depth)
return state->depth = FIX2LONG(depth);
}
-#ifdef __MACRUBY__
-#include "macruby_internal.h"
-#include "objc.h"
-static IMP json_generator_state_finalize_imp_super = NULL;
-static void
-json_generator_state_finalize_imp(void *self, SEL sel)
-{
- JSON_Generator_State *objState;
- Data_Get_Struct(self, JSON_Generator_State, objState);
- if (objState != NULL) {
- State_free(objState);
- }
- if (json_generator_state_finalize_imp_super != NULL) {
- ((void(*)(void *, SEL))json_generator_state_finalize_imp_super)(self, sel);
- }
-}
-#endif
-
/*
*
*/
@@ -1433,9 +1415,4 @@ void Init_generator()
#endif
i_SAFE_STATE_PROTOTYPE = rb_intern("SAFE_STATE_PROTOTYPE");
CJSON_SAFE_STATE_PROTOTYPE = Qnil;
-
-#ifdef __MACRUBY__
- json_generator_state_finalize_imp_super = rb_objc_install_method2((Class)cState,
- "finalize", (IMP)json_generator_state_finalize_imp);
-#endif
}
@@ -13,5 +13,4 @@
have_header("re.h")
have_header("ruby/st.h")
-$INCFLAGS << ' -I../../..'
create_makefile 'json/ext/parser'
@@ -1921,23 +1921,6 @@ static VALUE cParser_source(VALUE self)
return rb_str_dup(json->Vsource);
}
-#ifdef __MACRUBY__
-#include "macruby_internal.h"
-#include "objc.h"
-static IMP json_parser_finalize_imp_super = NULL;
-static void
-json_parser_finalize_imp(void *self, SEL sel)
-{
- GET_PARSER;
- if (json != NULL) {
- JSON_free(json);
- }
- if (json_parser_finalize_imp_super != NULL) {
- ((void(*)(void *, SEL))json_parser_finalize_imp_super)(self, sel);
- }
-}
-#endif
-
void Init_parser()
{
rb_require("json/common");
@@ -1983,9 +1966,4 @@ void Init_parser()
#else
i_iconv = rb_intern("iconv");
#endif
-
-#ifdef __MACRUBY__
- json_parser_finalize_imp_super = rb_objc_install_method2((Class)cParser,
- "finalize", (IMP)json_parser_finalize_imp);
-#endif
}
@@ -778,23 +778,6 @@ static VALUE cParser_source(VALUE self)
return rb_str_dup(json->Vsource);
}
-#ifdef __MACRUBY__
-#include "macruby_internal.h"
-#include "objc.h"
-static IMP json_parser_finalize_imp_super = NULL;
-static void
-json_parser_finalize_imp(void *self, SEL sel)
-{
- GET_PARSER;
- if (json != NULL) {
- JSON_free(json);
- }
- if (json_parser_finalize_imp_super != NULL) {
- ((void(*)(void *, SEL))json_parser_finalize_imp_super)(self, sel);
- }
-}
-#endif
-
void Init_parser()
{
rb_require("json/common");
@@ -840,9 +823,4 @@ void Init_parser()
#else
i_iconv = rb_intern("iconv");
#endif
-
-#ifdef __MACRUBY__
- json_parser_finalize_imp_super = rb_objc_install_method2((Class)cParser,
- "finalize", (IMP)json_parser_finalize_imp);
-#endif
}

0 comments on commit bc2c7fb

Please sign in to comment.