Permalink
Browse files

Hack to disable set/get object

  • Loading branch information...
bacek committed Apr 3, 2012
1 parent 186a1c5 commit ff0768972a72a8cb93d72e31c61a99e5e61e83f0
Showing with 9 additions and 7 deletions.
  1. +3 −2 include/parrot/context.h
  2. +6 −5 src/call/context_accessors.c
View
@@ -464,7 +464,8 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
# define Parrot_pcc_get_continuation(i, c) (CONTEXT_STRUCT(c)->current_cont)
# define Parrot_pcc_get_caller_ctx(i, c) (CONTEXT_STRUCT(c)->caller_ctx)
# define Parrot_pcc_get_namespace(i, c) (CONTEXT_STRUCT(c)->current_namespace)
-# define Parrot_pcc_get_object(i, c) (CONTEXT_STRUCT(c)->current_object)
+//# define Parrot_pcc_get_object(i, c) (CONTEXT_STRUCT(c)->current_object)
+# define Parrot_pcc_get_object(i, c) (PMCNULL)
# define Parrot_pcc_get_lex_pad(i, c) (CONTEXT_STRUCT(c)->lex_pad)
# define Parrot_pcc_get_handlers(i, c) (CONTEXT_STRUCT(c)->handlers)
@@ -568,7 +569,7 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
PARROT_GC_WRITE_BARRIER((i), (c)); \
} while (0)
# define Parrot_pcc_set_object(i, c, value) do { \
- CONTEXT_STRUCT(c)->current_object = (value); \
+ //CONTEXT_STRUCT(c)->current_object = (value); \
PARROT_GC_WRITE_BARRIER((i), (c)); \
} while (0)
# define Parrot_pcc_set_lex_pad(i, c, value) do { \
@@ -480,18 +480,19 @@ PMC*
Parrot_pcc_get_object_func(SHIM_INTERP, ARGIN(const PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_object_func)
- PARROT_ASSERT(ctx->vtable->base_type == enum_class_Context);
- return CONTEXT_STRUCT(ctx)->current_object;
+ return PMCNULL;
+// PARROT_ASSERT(ctx->vtable->base_type == enum_class_Context);
+// return CONTEXT_STRUCT(ctx)->current_object;
}
PARROT_EXPORT
void
Parrot_pcc_set_object_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *object))
{
ASSERT_ARGS(Parrot_pcc_set_object_func)
- PARROT_ASSERT(ctx->vtable->base_type == enum_class_Context);
- PARROT_GC_WRITE_BARRIER(interp, ctx);
- CONTEXT_STRUCT(ctx)->current_object = object;
+// PARROT_ASSERT(ctx->vtable->base_type == enum_class_Context);
+// PARROT_GC_WRITE_BARRIER(interp, ctx);
+// CONTEXT_STRUCT(ctx)->current_object = object;
}
/*

0 comments on commit ff07689

Please sign in to comment.