[svn:parrot] r38556 - in branches/gc_api: include/parrot src src/gc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Thu May 7 23:39:35 UTC 2009
Author: whiteknight
Date: Thu May 7 23:39:34 2009
New Revision: 38556
URL: https://trac.parrot.org/parrot/changeset/38556
Log:
[gc_api] rename new_bufferlike_header to Parrot_gc_new_bufferlike_header
Modified:
branches/gc_api/include/parrot/gc_api.h
branches/gc_api/src/gc/api.c
branches/gc_api/src/list.c
Modified: branches/gc_api/include/parrot/gc_api.h
==============================================================================
--- branches/gc_api/include/parrot/gc_api.h Thu May 7 23:36:56 2009 (r38555)
+++ branches/gc_api/include/parrot/gc_api.h Thu May 7 23:39:34 2009 (r38556)
@@ -55,16 +55,6 @@
/* HEADERIZER BEGIN: src/gc/api.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-Buffer * new_buffer_header(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-void * new_bufferlike_header(PARROT_INTERP, size_t size)
- __attribute__nonnull__(1);
-
void Parrot_do_gc_run(PARROT_INTERP, UINTVAL flags)
__attribute__nonnull__(1);
@@ -113,6 +103,11 @@
void Parrot_gc_ms_run_init(PARROT_INTERP)
__attribute__nonnull__(1);
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+void * Parrot_gc_new_bufferlike_header(PARROT_INTERP, size_t size)
+ __attribute__nonnull__(1);
+
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
PMC * Parrot_gc_new_pmc_header(PARROT_INTERP, UINTVAL flags)
@@ -129,10 +124,6 @@
void Parrot_gc_profile_start(PARROT_INTERP)
__attribute__nonnull__(1);
-#define ASSERT_ARGS_new_buffer_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_new_bufferlike_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_do_gc_run __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_gc_add_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -156,6 +147,9 @@
PARROT_ASSERT_ARG(b)
#define ASSERT_ARGS_Parrot_gc_ms_run_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
+#define ASSERT_ARGS_Parrot_gc_new_bufferlike_header \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_gc_new_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_gc_new_string_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \
Modified: branches/gc_api/src/gc/api.c
==============================================================================
--- branches/gc_api/src/gc/api.c Thu May 7 23:36:56 2009 (r38555)
+++ branches/gc_api/src/gc/api.c Thu May 7 23:39:34 2009 (r38556)
@@ -175,7 +175,7 @@
Parrot_gc_add_pmc_ext(interp, pmc);
/* Would like to be able to do this, instead of allocating directly from
the OS. Causes a segfault that hasn't been figured out yet. */
- /* PMC_sync(pmc) = (Sync *)new_bufferlike_header(interp, sizeof(Sync)); */
+ /* PMC_sync(pmc) = (Sync *)Parrot_gc_new_bufferlike_header(interp, sizeof(Sync)); */
PMC_sync(pmc) = mem_allocate_typed(Sync);
if(!PMC_sync(pmc))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ALLOCATION_ERROR,
@@ -234,9 +234,9 @@
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
void *
-new_bufferlike_header(PARROT_INTERP, size_t size)
+Parrot_gc_new_bufferlike_header(PARROT_INTERP, size_t size)
{
- ASSERT_ARGS(new_bufferlike_header)
+ ASSERT_ARGS(Parrot_gc_new_bufferlike_header)
Small_Object_Pool * const pool = get_bufferlike_pool(interp, size);
return get_free_buffer(interp, pool);
Modified: branches/gc_api/src/list.c
==============================================================================
--- branches/gc_api/src/list.c Thu May 7 23:36:56 2009 (r38555)
+++ branches/gc_api/src/list.c Thu May 7 23:39:34 2009 (r38556)
@@ -361,7 +361,7 @@
Parrot_block_GC_mark(interp);
/*Parrot_block_GC_sweep(interp); - why */
- chunk = (List_chunk *)new_bufferlike_header(interp, sizeof (*chunk));
+ chunk = (List_chunk *)Parrot_gc_new_bufferlike_header(interp, sizeof (*chunk));
chunk->items = items;
chunk->n_chunks = 0;
chunk->n_items = 0;
@@ -1274,7 +1274,7 @@
list_new(PARROT_INTERP, PARROT_DATA_TYPE type)
{
ASSERT_ARGS(list_new)
- List * const list = (List *)new_bufferlike_header(interp, sizeof (*list));
+ List * const list = (List *)Parrot_gc_new_bufferlike_header(interp, sizeof (*list));
list->item_type = type;
switch (type) {
More information about the parrot-commits
mailing list