summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-07-25 16:23:05 +0000
committerCarl Worth <cworth@cworth.org>2005-07-25 16:23:05 +0000
commitea1218a434fb4077d27a4d8310e4ce3415102c58 (patch)
tree478f96fd7831da619b56af138c56dc50a0786968
parent85b74d82164e7908842d42bb1b11e8cf8c876b82 (diff)
Replace all occurences of refcount with ref_count.
Replace refcounted with reference-counted.
-rw-r--r--ChangeLog12
-rw-r--r--doc/public/language-bindings.xml2
-rw-r--r--src/cairo-font.c20
-rw-r--r--src/cairo-ft-font.c4
-rw-r--r--src/cairo-glitz-surface.c10
-rw-r--r--src/cairo-pdf-surface.c10
-rw-r--r--src/cairoint.h6
7 files changed, 38 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a8f4f49d..0bf9a11df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-07-25 Carl Worth <cworth@cworth.org>
+
+ * src/cairoint.h:
+ * src/cairo-font.c:
+ * src/cairo-ft-font.c:
+ * src/cairo-glitz-surface.c:
+ * src/cairo-pdf-surface.c: Replace all occurences of refcount with
+ ref_count.
+
+ * doc/public/language-bindings.xml: Replace refcounted with
+ reference-counted.
+
2005-07-25 Owen Taylor <otaylor@redhat.com>
reviewed by: cworth
diff --git a/doc/public/language-bindings.xml b/doc/public/language-bindings.xml
index b0ee8e879..26b98e1be 100644
--- a/doc/public/language-bindings.xml
+++ b/doc/public/language-bindings.xml
@@ -47,7 +47,7 @@
<title>Memory Management</title>
<para>
The objects in cairo can roughly be divided into two types:
- refcounted opaque types like
+ reference-counted, opaque types like
<link
linkend="cairo-surface-t"><type>cairo_surface_t</type></link>
and plain structures like
diff --git a/src/cairo-font.c b/src/cairo-font.c
index c568e6584..be1637830 100644
--- a/src/cairo-font.c
+++ b/src/cairo-font.c
@@ -45,7 +45,7 @@ void
_cairo_font_face_init (cairo_font_face_t *font_face,
const cairo_font_face_backend_t *backend)
{
- font_face->refcount = 1;
+ font_face->ref_count = 1;
font_face->backend = backend;
_cairo_user_data_array_init (&font_face->user_data);
@@ -66,7 +66,7 @@ cairo_font_face_reference (cairo_font_face_t *font_face)
if (font_face == NULL)
return;
- font_face->refcount++;
+ font_face->ref_count++;
}
/**
@@ -83,7 +83,7 @@ cairo_font_face_destroy (cairo_font_face_t *font_face)
if (font_face == NULL)
return;
- if (--(font_face->refcount) > 0)
+ if (--(font_face->ref_count) > 0)
return;
font_face->backend->destroy (font_face);
@@ -92,7 +92,7 @@ cairo_font_face_destroy (cairo_font_face_t *font_face)
* FreeType backend where cairo_ft_font_face_t and cairo_ft_unscaled_font_t
* need to effectively mutually reference each other
*/
- if (font_face->refcount > 0)
+ if (font_face->ref_count > 0)
return;
_cairo_user_data_array_fini (&font_face->user_data);
@@ -774,7 +774,7 @@ _cairo_scaled_font_init (cairo_scaled_font_t *scaled_font,
scaled_font->ctm = *ctm;
cairo_matrix_multiply (&scaled_font->scale, &scaled_font->font_matrix, &scaled_font->ctm);
- scaled_font->refcount = 1;
+ scaled_font->ref_count = 1;
scaled_font->backend = backend;
}
@@ -867,7 +867,7 @@ void
_cairo_unscaled_font_init (cairo_unscaled_font_t *unscaled_font,
const cairo_unscaled_font_backend_t *backend)
{
- unscaled_font->refcount = 1;
+ unscaled_font->ref_count = 1;
unscaled_font->backend = backend;
}
@@ -877,7 +877,7 @@ _cairo_unscaled_font_reference (cairo_unscaled_font_t *unscaled_font)
if (unscaled_font == NULL)
return;
- unscaled_font->refcount++;
+ unscaled_font->ref_count++;
}
void
@@ -886,7 +886,7 @@ _cairo_unscaled_font_destroy (cairo_unscaled_font_t *unscaled_font)
if (unscaled_font == NULL)
return;
- if (--(unscaled_font->refcount) > 0)
+ if (--(unscaled_font->ref_count) > 0)
return;
unscaled_font->backend->destroy (unscaled_font);
@@ -913,7 +913,7 @@ cairo_scaled_font_reference (cairo_scaled_font_t *scaled_font)
if (scaled_font == NULL)
return;
- scaled_font->refcount++;
+ scaled_font->ref_count++;
}
/**
@@ -933,7 +933,7 @@ cairo_scaled_font_destroy (cairo_scaled_font_t *scaled_font)
if (scaled_font == NULL)
return;
- if (--(scaled_font->refcount) > 0)
+ if (--(scaled_font->ref_count) > 0)
return;
if (scaled_font->font_face) {
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index ea9bda73c..46406c975 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -2040,7 +2040,7 @@ _ft_font_face_destroy (void *abstract_face)
if (font_face->unscaled &&
font_face->unscaled->from_face &&
- font_face->unscaled->base.refcount > 1) {
+ font_face->unscaled->base.ref_count > 1) {
cairo_font_face_reference (&font_face->base);
_cairo_unscaled_font_destroy (&font_face->unscaled->base);
@@ -2270,7 +2270,7 @@ cairo_ft_font_face_create_for_pattern (FcPattern *pattern)
/**
* cairo_ft_font_face_create_for_ft_face:
* @face: A FreeType face object, already opened. This must
- * be kept around until the face's refcount drops to
+ * be kept around until the face's ref_count drops to
* zero and it is freed. Since the face may be referenced
* internally to Cairo, the best way to determine when it
* is safe to free the face is to pass a
diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index 2691f67d8..32c508187 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -1548,7 +1548,7 @@ typedef struct _cairo_glitz_glyph_cache {
typedef struct {
cairo_glyph_cache_key_t key;
- int refcount;
+ int ref_count;
cairo_glyph_size_t size;
cairo_glitz_area_t *area;
cairo_bool_t locked;
@@ -1606,7 +1606,7 @@ _cairo_glitz_glyph_cache_create_entry (void *abstract_cache,
if (!entry)
return CAIRO_STATUS_NO_MEMORY;
- entry->refcount = 1;
+ entry->ref_count = 1;
entry->key = *key;
entry->area = NULL;
entry->locked = FALSE;
@@ -1624,8 +1624,8 @@ _cairo_glitz_glyph_cache_destroy_entry (void *abstract_cache,
{
cairo_glitz_glyph_cache_entry_t *entry = abstract_entry;
- entry->refcount--;
- if (entry->refcount)
+ entry->ref_count--;
+ if (entry->ref_count)
return;
if (entry->area)
@@ -1641,7 +1641,7 @@ _cairo_glitz_glyph_cache_entry_reference (void *abstract_entry)
{
cairo_glitz_glyph_cache_entry_t *entry = abstract_entry;
- entry->refcount++;
+ entry->ref_count++;
}
static void
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 2b4b6ad29..0330f6934 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -109,7 +109,7 @@ struct cairo_pdf_stream {
struct cairo_pdf_document {
cairo_output_stream_t *output_stream;
- unsigned long refcount;
+ unsigned long ref_count;
cairo_surface_t *owner;
cairo_bool_t finished;
@@ -1422,7 +1422,7 @@ _cairo_pdf_document_create (cairo_output_stream_t *output_stream,
return NULL;
document->output_stream = output_stream;
- document->refcount = 1;
+ document->ref_count = 1;
document->owner = NULL;
document->finished = FALSE;
document->width = width;
@@ -1653,14 +1653,14 @@ _cairo_pdf_document_write_xref (cairo_pdf_document_t *document)
static void
_cairo_pdf_document_reference (cairo_pdf_document_t *document)
{
- document->refcount++;
+ document->ref_count++;
}
static void
_cairo_pdf_document_destroy (cairo_pdf_document_t *document)
{
- document->refcount--;
- if (document->refcount > 0)
+ document->ref_count--;
+ if (document->ref_count > 0)
return;
_cairo_pdf_document_finish (document);
diff --git a/src/cairoint.h b/src/cairoint.h
index a7ff73186..3d236bfe5 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -453,12 +453,12 @@ typedef struct _cairo_font_face_backend cairo_font_face_backend_t;
* glyph cache.
*/
struct _cairo_unscaled_font {
- int refcount;
+ int ref_count;
const cairo_unscaled_font_backend_t *backend;
};
struct _cairo_scaled_font {
- int refcount;
+ int ref_count;
cairo_matrix_t font_matrix; /* font space => user space */
cairo_matrix_t ctm; /* user space => device space */
cairo_matrix_t scale; /* font space => device space */
@@ -467,7 +467,7 @@ struct _cairo_scaled_font {
};
struct _cairo_font_face {
- int refcount;
+ int ref_count;
cairo_user_data_array_t user_data;
const cairo_font_face_backend_t *backend;
};