[perl-Gtk2] Use gperl_hv_take_sv instead of hv_store
- From: Torsten Schönfeld <tsch src gnome org>
- To: svn-commits-list gnome org
- Subject: [perl-Gtk2] Use gperl_hv_take_sv instead of hv_store
- Date: Sun, 19 Jul 2009 18:28:52 +0000 (UTC)
commit 278cc76fd53f87c9a5bdbf7db05230e6848b949c
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Sun Jul 19 20:27:47 2009 +0200
Use gperl_hv_take_sv instead of hv_store
xs/GdkGC.xs | 36 ++++++++++++++++++------------------
xs/GdkInput.xs | 14 +++++++-------
xs/GdkKeys.xs | 10 +++++-----
xs/GdkPixbuf.xs | 14 +++++++-------
xs/GdkTypes.xs | 44 ++++++++++++++++++++++----------------------
xs/GdkWindow.xs | 28 ++++++++++++++--------------
xs/GtkBuildable.xs | 10 +++++-----
xs/GtkEntry.xs | 8 ++++----
xs/GtkFileFilter.xs | 19 ++++++++++---------
xs/GtkRecentFilter.xs | 16 ++++++++--------
xs/GtkSelection.xs | 6 +++---
xs/GtkStock.xs | 10 +++++-----
xs/GtkTooltips.xs | 8 ++++----
13 files changed, 112 insertions(+), 111 deletions(-)
---
diff --git a/xs/GdkGC.xs b/xs/GdkGC.xs
index 53ef970..745ca1a 100644
--- a/xs/GdkGC.xs
+++ b/xs/GdkGC.xs
@@ -38,24 +38,24 @@ newSVGdkGCValues (GdkGCValues * v)
h = newHV ();
r = newRV_noinc ((SV*)h);
- hv_store (h, "foreground", 10, newSVGdkColor_copy (&v->foreground), 0);
- hv_store (h, "background", 10, newSVGdkColor_copy (&v->background), 0);
- if (v->font) hv_store (h, "font", 4, newSVGdkFont (v->font), 0);
- hv_store (h, "function", 8, newSVGdkFunction (v->function), 0);
- hv_store (h, "fill", 4, newSVGdkFill (v->fill), 0);
- if (v->tile) hv_store (h, "tile", 4, newSVGdkPixmap (v->tile), 0);
- if (v->stipple) hv_store (h, "stipple", 7, newSVGdkPixmap (v->stipple), 0);
- if (v->clip_mask) hv_store (h, "clip_mask", 9, newSVGdkPixmap (v->clip_mask), 0);
- hv_store (h, "subwindow_mode", 14, newSVGdkSubwindowMode (v->subwindow_mode), 0);
- hv_store (h, "ts_x_origin", 11, newSViv (v->ts_x_origin), 0);
- hv_store (h, "ts_y_origin", 11, newSViv (v->ts_y_origin), 0);
- hv_store (h, "clip_x_origin", 13, newSViv (v->clip_x_origin), 0);
- hv_store (h, "clip_y_origin", 13, newSViv (v->clip_y_origin), 0);
- hv_store (h, "graphics_exposures", 18, newSViv (v->graphics_exposures), 0);
- hv_store (h, "line_width", 10, newSViv (v->line_width), 0);
- hv_store (h, "line_style", 10, newSVGdkLineStyle (v->line_style), 0);
- hv_store (h, "cap_style", 9, newSVGdkCapStyle (v->cap_style), 0);
- hv_store (h, "join_style", 10, newSVGdkJoinStyle (v->join_style), 0);
+ gperl_hv_take_sv_s (h, "foreground", newSVGdkColor_copy (&v->foreground));
+ gperl_hv_take_sv_s (h, "background", newSVGdkColor_copy (&v->background));
+ if (v->font) gperl_hv_take_sv_s (h, "font", newSVGdkFont (v->font));
+ gperl_hv_take_sv_s (h, "function", newSVGdkFunction (v->function));
+ gperl_hv_take_sv_s (h, "fill", newSVGdkFill (v->fill));
+ if (v->tile) gperl_hv_take_sv_s (h, "tile", newSVGdkPixmap (v->tile));
+ if (v->stipple) gperl_hv_take_sv_s (h, "stipple", newSVGdkPixmap (v->stipple));
+ if (v->clip_mask) gperl_hv_take_sv_s (h, "clip_mask", newSVGdkPixmap (v->clip_mask));
+ gperl_hv_take_sv_s (h, "subwindow_mode", newSVGdkSubwindowMode (v->subwindow_mode));
+ gperl_hv_take_sv_s (h, "ts_x_origin", newSViv (v->ts_x_origin));
+ gperl_hv_take_sv_s (h, "ts_y_origin", newSViv (v->ts_y_origin));
+ gperl_hv_take_sv_s (h, "clip_x_origin", newSViv (v->clip_x_origin));
+ gperl_hv_take_sv_s (h, "clip_y_origin", newSViv (v->clip_y_origin));
+ gperl_hv_take_sv_s (h, "graphics_exposures", newSViv (v->graphics_exposures));
+ gperl_hv_take_sv_s (h, "line_width", newSViv (v->line_width));
+ gperl_hv_take_sv_s (h, "line_style", newSVGdkLineStyle (v->line_style));
+ gperl_hv_take_sv_s (h, "cap_style", newSVGdkCapStyle (v->cap_style));
+ gperl_hv_take_sv_s (h, "join_style", newSVGdkJoinStyle (v->join_style));
return r;
}
diff --git a/xs/GdkInput.xs b/xs/GdkInput.xs
index 6f498d1..a32717d 100644
--- a/xs/GdkInput.xs
+++ b/xs/GdkInput.xs
@@ -81,9 +81,9 @@ axes (device)
for (i = 0; i < device->num_axes; i++) {
HV *axis = newHV ();
- hv_store (axis, "use", 3, newSVGdkAxisUse (device->axes[i].use), 0);
- hv_store (axis, "min", 3, newSVnv (device->axes[i].min), 0);
- hv_store (axis, "max", 3, newSVnv (device->axes[i].max), 0);
+ gperl_hv_take_sv_s (axis, "use", newSVGdkAxisUse (device->axes[i].use));
+ gperl_hv_take_sv_s (axis, "min", newSVnv (device->axes[i].min));
+ gperl_hv_take_sv_s (axis, "max", newSVnv (device->axes[i].max));
PUSHs (sv_2mortal (newRV_noinc ((SV *) axis)));
}
@@ -105,8 +105,8 @@ keys (device)
for (i = 0; i < device->num_keys; i++) {
HV *key = newHV ();
- hv_store (key, "keyval", 6, newSVuv (device->keys[i].keyval), 0);
- hv_store (key, "modifiers", 9, newSVGdkModifierType (device->keys[i].modifiers), 0);
+ gperl_hv_take_sv_s (key, "keyval", newSVuv (device->keys[i].keyval));
+ gperl_hv_take_sv_s (key, "modifiers", newSVGdkModifierType (device->keys[i].modifiers));
PUSHs (sv_2mortal (newRV_noinc ((SV *) key)));
}
@@ -198,8 +198,8 @@ gdk_device_get_history (device, window, start, stop)
event = newHV ();
- hv_store (event, "axes", 4, newRV_noinc ((SV *) axes), 0);
- hv_store (event, "time", 4, newSVuv (events[i]->time), 0);
+ gperl_hv_take_sv_s (event, "axes", newRV_noinc ((SV *) axes));
+ gperl_hv_take_sv_s (event, "time", newSVuv (events[i]->time));
PUSHs (sv_2mortal (newRV_noinc ((SV *) event)));
}
diff --git a/xs/GdkKeys.xs b/xs/GdkKeys.xs
index 38c6e23..b9b2d62 100644
--- a/xs/GdkKeys.xs
+++ b/xs/GdkKeys.xs
@@ -57,9 +57,9 @@ newSVGdkKeymapKey (GdkKeymapKey *key)
hv = newHV ();
- hv_store (hv, "keycode", 7, newSVuv (key->keycode), 0);
- hv_store (hv, "group", 5, newSViv (key->group), 0);
- hv_store (hv, "level", 5, newSViv (key->level), 0);
+ gperl_hv_take_sv_s (hv, "keycode", newSVuv (key->keycode));
+ gperl_hv_take_sv_s (hv, "group", newSViv (key->group));
+ gperl_hv_take_sv_s (hv, "level", newSViv (key->level));
return newRV_noinc ((SV *) hv);
}
@@ -180,8 +180,8 @@ gdk_keymap_get_entries_for_keycode (keymap, hardware_keycode)
EXTEND (SP, n_entries);
for (i = 0; i < n_entries; i++) {
hv = newHV ();
- hv_store (hv, "key", 3, newSVGdkKeymapKey (&keys[i]), 0);
- hv_store (hv, "keyval", 6, newSVuv (keyvals[i]), 0);
+ gperl_hv_take_sv_s (hv, "key", newSVGdkKeymapKey (&keys[i]));
+ gperl_hv_take_sv_s (hv, "keyval", newSVuv (keyvals[i]));
PUSHs (sv_2mortal (newRV_noinc ((SV*) hv)));
}
diff --git a/xs/GdkPixbuf.xs b/xs/GdkPixbuf.xs
index de7e9c2..31da76f 100644
--- a/xs/GdkPixbuf.xs
+++ b/xs/GdkPixbuf.xs
@@ -42,25 +42,25 @@ newSVGdkPixbufFormat (GdkPixbufFormat * format)
HV * stash, * hv = newHV ();
s = gdk_pixbuf_format_get_name (format);
- hv_store (hv, "name", 4, newSVGChar (s), 0);
+ gperl_hv_take_sv_s (hv, "name", newSVGChar (s));
g_free (s);
s = gdk_pixbuf_format_get_description (format);
- hv_store (hv, "description", 11, newSVGChar (s), 0);
+ gperl_hv_take_sv_s (hv, "description", newSVGChar (s));
g_free (s);
strv = gdk_pixbuf_format_get_mime_types (format);
av = newAV ();
for (j = 0 ; strv && strv[j] ; j++)
av_store (av, j, newSVGChar (strv[j]));
- hv_store (hv, "mime_types", 10, newRV_noinc ((SV*) av), 0);
+ gperl_hv_take_sv_s (hv, "mime_types", newRV_noinc ((SV*) av));
g_strfreev (strv);
strv = gdk_pixbuf_format_get_extensions (format);
av = newAV ();
for (j = 0 ; strv && strv[j] ; j++)
av_store (av, j, newSVGChar (strv[j]));
- hv_store (hv, "extensions", 10, newRV_noinc ((SV*) av), 0);
+ gperl_hv_take_sv_s (hv, "extensions", newRV_noinc ((SV*) av));
g_strfreev (strv);
#if GTK_CHECK_VERSION (2,6,0)
@@ -68,13 +68,13 @@ newSVGdkPixbufFormat (GdkPixbufFormat * format)
gboolean b;
b = gdk_pixbuf_format_is_scalable (format);
- hv_store (hv, "is_scalable", 11, newSVuv (b), 0);
+ gperl_hv_take_sv_s (hv, "is_scalable", newSVuv (b));
b = gdk_pixbuf_format_is_disabled (format);
- hv_store (hv, "is_disabled", 11, newSVuv (b), 0);
+ gperl_hv_take_sv_s (hv, "is_disabled", newSVuv (b));
s = gdk_pixbuf_format_get_license (format);
- hv_store (hv, "license", 7, newSVGChar (s), 0);
+ gperl_hv_take_sv_s (hv, "license", newSVGChar (s));
g_free (s);
}
#endif
diff --git a/xs/GdkTypes.xs b/xs/GdkTypes.xs
index a0c43ee..248c97b 100644
--- a/xs/GdkTypes.xs
+++ b/xs/GdkTypes.xs
@@ -29,17 +29,17 @@ newSVGdkGeometry (GdkGeometry *geometry)
HV *object = newHV ();
if (geometry) {
- hv_store (object, "min_width", 9, newSViv (geometry->min_width), 0);
- hv_store (object, "min_height", 10, newSViv (geometry->min_height), 0);
- hv_store (object, "max_width", 9, newSViv (geometry->max_width), 0);
- hv_store (object, "max_height", 10, newSViv (geometry->max_height), 0);
- hv_store (object, "base_width", 10, newSViv (geometry->base_width), 0);
- hv_store (object, "base_height", 11, newSViv (geometry->base_height), 0);
- hv_store (object, "width_inc", 9, newSViv (geometry->width_inc), 0);
- hv_store (object, "height_inc", 10, newSViv (geometry->height_inc), 0);
- hv_store (object, "min_aspect", 10, newSVnv (geometry->min_aspect), 0);
- hv_store (object, "max_aspect", 10, newSVnv (geometry->max_aspect), 0);
- hv_store (object, "win_gravity", 11, newSVGdkGravity (geometry->win_gravity), 0);
+ gperl_hv_take_sv_s (object, "min_width", newSViv (geometry->min_width));
+ gperl_hv_take_sv_s (object, "min_height", newSViv (geometry->min_height));
+ gperl_hv_take_sv_s (object, "max_width", newSViv (geometry->max_width));
+ gperl_hv_take_sv_s (object, "max_height", newSViv (geometry->max_height));
+ gperl_hv_take_sv_s (object, "base_width", newSViv (geometry->base_width));
+ gperl_hv_take_sv_s (object, "base_height", newSViv (geometry->base_height));
+ gperl_hv_take_sv_s (object, "width_inc", newSViv (geometry->width_inc));
+ gperl_hv_take_sv_s (object, "height_inc", newSViv (geometry->height_inc));
+ gperl_hv_take_sv_s (object, "min_aspect", newSVnv (geometry->min_aspect));
+ gperl_hv_take_sv_s (object, "max_aspect", newSVnv (geometry->max_aspect));
+ gperl_hv_take_sv_s (object, "win_gravity", newSVGdkGravity (geometry->win_gravity));
}
return sv_bless (newRV_noinc ((SV *) object),
@@ -270,18 +270,18 @@ min_width (SV *object, SV *newvalue=NULL)
newvalue = newSVsv (newvalue);
switch (ix) {
- case 0: hv_store (geometry, "min_width", 9, newvalue, 0); break;
- case 1: hv_store (geometry, "min_height", 10, newvalue, 0); break;
- case 2: hv_store (geometry, "max_width", 9, newvalue, 0); break;
- case 3: hv_store (geometry, "max_height", 10, newvalue, 0); break;
- case 4: hv_store (geometry, "base_width", 10, newvalue, 0); break;
- case 5: hv_store (geometry, "base_height", 11, newvalue, 0); break;
- case 6: hv_store (geometry, "width_inc", 9, newvalue, 0); break;
- case 7: hv_store (geometry, "height_inc", 10, newvalue, 0); break;
- case 8: hv_store (geometry, "min_aspect", 10, newvalue, 0); break;
- case 9: hv_store (geometry, "max_aspect", 10, newvalue, 0); break;
+ case 0: gperl_hv_take_sv_s (geometry, "min_width", newvalue); break;
+ case 1: gperl_hv_take_sv_s (geometry, "min_height", newvalue); break;
+ case 2: gperl_hv_take_sv_s (geometry, "max_width", newvalue); break;
+ case 3: gperl_hv_take_sv_s (geometry, "max_height", newvalue); break;
+ case 4: gperl_hv_take_sv_s (geometry, "base_width", newvalue); break;
+ case 5: gperl_hv_take_sv_s (geometry, "base_height", newvalue); break;
+ case 6: gperl_hv_take_sv_s (geometry, "width_inc", newvalue); break;
+ case 7: gperl_hv_take_sv_s (geometry, "height_inc", newvalue); break;
+ case 8: gperl_hv_take_sv_s (geometry, "min_aspect", newvalue); break;
+ case 9: gperl_hv_take_sv_s (geometry, "max_aspect", newvalue); break;
case 10: /* fall-through */
- case 11: hv_store (geometry, "win_gravity", 11, newvalue, 0); break;
+ case 11: gperl_hv_take_sv_s (geometry, "win_gravity", newvalue); break;
default:
g_assert_not_reached ();
}
diff --git a/xs/GdkWindow.xs b/xs/GdkWindow.xs
index 4211fee..83fc524 100644
--- a/xs/GdkWindow.xs
+++ b/xs/GdkWindow.xs
@@ -30,20 +30,20 @@ newSVGdkWindowAttr (GdkWindowAttr *attr)
HV *object = newHV ();
if (attr && attr->x && attr->y) {
- hv_store (object, "title", 5, newSVGChar (attr->title), 0);
- hv_store (object, "event_mask", 10, newSVGdkEventMask (attr->event_mask), 0);
- hv_store (object, "x", 1, newSViv (attr->x), 0);
- hv_store (object, "y", 1, newSViv (attr->y), 0);
- hv_store (object, "width", 5, newSViv (attr->width), 0);
- hv_store (object, "height", 6, newSViv (attr->height), 0);
- hv_store (object, "wclass", 6, newSVGdkWindowClass (attr->wclass), 0);
- hv_store (object, "visual", 6, newSVGdkVisual (attr->visual), 0);
- hv_store (object, "colormap", 8, newSVGdkColormap (attr->colormap), 0);
- hv_store (object, "window_type", 11, newSVGdkWindowType (attr->window_type), 0);
- hv_store (object, "cursor", 6, newSVGdkCursor (attr->cursor), 0);
- hv_store (object, "wmclass_name", 12, newSVGChar (attr->wmclass_name), 0);
- hv_store (object, "wmclass_class", 13, newSVGChar (attr->wmclass_class), 0);
- hv_store (object, "override_redirect", 17, boolSV (attr->override_redirect), 0);
+ gperl_hv_take_sv_s (object, "title", newSVGChar (attr->title));
+ gperl_hv_take_sv_s (object, "event_mask", newSVGdkEventMask (attr->event_mask));
+ gperl_hv_take_sv_s (object, "x", newSViv (attr->x));
+ gperl_hv_take_sv_s (object, "y", newSViv (attr->y));
+ gperl_hv_take_sv_s (object, "width", newSViv (attr->width));
+ gperl_hv_take_sv_s (object, "height", newSViv (attr->height));
+ gperl_hv_take_sv_s (object, "wclass", newSVGdkWindowClass (attr->wclass));
+ gperl_hv_take_sv_s (object, "visual", newSVGdkVisual (attr->visual));
+ gperl_hv_take_sv_s (object, "colormap", newSVGdkColormap (attr->colormap));
+ gperl_hv_take_sv_s (object, "window_type", newSVGdkWindowType (attr->window_type));
+ gperl_hv_take_sv_s (object, "cursor", newSVGdkCursor (attr->cursor));
+ gperl_hv_take_sv_s (object, "wmclass_name", newSVGChar (attr->wmclass_name));
+ gperl_hv_take_sv_s (object, "wmclass_class", newSVGChar (attr->wmclass_class));
+ gperl_hv_take_sv_s (object, "override_redirect", boolSV (attr->override_redirect));
}
return sv_bless (newRV_noinc ((SV *) object),
diff --git a/xs/GtkBuildable.xs b/xs/GtkBuildable.xs
index f2e7619..416cd3b 100644
--- a/xs/GtkBuildable.xs
+++ b/xs/GtkBuildable.xs
@@ -126,11 +126,11 @@ gtk2perl_buildable_parser_start_element (GMarkupParseContext *context,
attrs = newRV_noinc ((SV *) hv);
for (i = 0; attribute_names[i] != NULL ; i++)
- hv_store (hv,
- attribute_names[i],
- strlen (attribute_names[i]),
- newSVGChar (attribute_values[i]),
- 0);
+ gperl_hv_take_sv (
+ hv,
+ attribute_names[i],
+ strlen (attribute_names[i]),
+ newSVGChar (attribute_values[i]));
call_parser_method (error,
user_data,
diff --git a/xs/GtkEntry.xs b/xs/GtkEntry.xs
index 9971035..6e28bb8 100644
--- a/xs/GtkEntry.xs
+++ b/xs/GtkEntry.xs
@@ -34,10 +34,10 @@ gtk2perl_border_wrap (GType gtype, const char * package, gpointer boxed, gboolea
hv = newHV ();
- hv_store (hv, "left", 4, newSViv (border->left), 0);
- hv_store (hv, "right", 5, newSViv (border->right), 0);
- hv_store (hv, "top", 3, newSViv (border->top), 0);
- hv_store (hv, "bottom", 6, newSViv (border->bottom), 0);
+ gperl_hv_take_sv_s (hv, "left", newSViv (border->left));
+ gperl_hv_take_sv_s (hv, "right", newSViv (border->right));
+ gperl_hv_take_sv_s (hv, "top", newSViv (border->top));
+ gperl_hv_take_sv_s (hv, "bottom", newSViv (border->bottom));
if (own)
gtk_border_free (border);
diff --git a/xs/GtkFileFilter.xs b/xs/GtkFileFilter.xs
index 3509391..65bcd07 100644
--- a/xs/GtkFileFilter.xs
+++ b/xs/GtkFileFilter.xs
@@ -31,19 +31,20 @@ newSVGtkFileFilterInfo (const GtkFileFilterInfo * info)
hv = newHV ();
- hv_store (hv, "contains", 8,
- newSVGtkFileFilterFlags (info->contains), 0);
+ gperl_hv_take_sv_s (hv, "contains",
+ newSVGtkFileFilterFlags (info->contains));
if (info->filename)
- hv_store (hv, "filename", 8,
- gperl_sv_from_filename (info->filename), 0);
+ gperl_hv_take_sv_s (hv, "filename",
+ gperl_sv_from_filename (info->filename));
if (info->uri)
- hv_store (hv, "uri", 3, newSVpv (info->uri, PL_na), 0);
+ gperl_hv_take_sv_s (hv, "uri",
+ newSVpv (info->uri, PL_na));
if (info->display_name)
- hv_store (hv, "display_name", 12,
- newSVGChar (info->display_name), 0);
+ gperl_hv_take_sv_s (hv, "display_name",
+ newSVGChar (info->display_name));
if (info->mime_type)
- hv_store (hv, "mime_type", 9,
- newSVGChar (info->mime_type), 0);
+ gperl_hv_take_sv_s (hv, "mime_type",
+ newSVGChar (info->mime_type));
return newRV_noinc ((SV*) hv);
}
diff --git a/xs/GtkRecentFilter.xs b/xs/GtkRecentFilter.xs
index 31bbb9f..3995ad8 100644
--- a/xs/GtkRecentFilter.xs
+++ b/xs/GtkRecentFilter.xs
@@ -36,25 +36,25 @@ newSVGtkRecentFilterInfo (const GtkRecentFilterInfo *info)
hv = newHV ();
- hv_store (hv, "contains", 8,
- newSVGtkRecentFilterFlags (info->contains), 0);
+ gperl_hv_take_sv_s (hv, "contains",
+ newSVGtkRecentFilterFlags (info->contains));
if (info->uri)
- hv_store (hv, "uri", 3, newSVpv (info->uri, PL_na), 0);
+ gperl_hv_take_sv_s (hv, "uri", newSVpv (info->uri, PL_na));
if (info->display_name)
- hv_store (hv, "display_name", 12, newSVGChar (info->display_name), 0);
+ gperl_hv_take_sv_s (hv, "display_name", newSVGChar (info->display_name));
if (info->mime_type)
- hv_store (hv, "mime_type", 9, newSVGChar (info->mime_type), 0);
+ gperl_hv_take_sv_s (hv, "mime_type", newSVGChar (info->mime_type));
if (info->applications)
- hv_store (hv, "applications", 12, gtk2perl_sv_from_strv (info->applications), 0);
+ gperl_hv_take_sv_s (hv, "applications", gtk2perl_sv_from_strv (info->applications));
if (info->groups)
- hv_store (hv, "groups", 6, gtk2perl_sv_from_strv (info->groups), 0);
+ gperl_hv_take_sv_s (hv, "groups", gtk2perl_sv_from_strv (info->groups));
- hv_store (hv, "age", 3, newSViv (info->age), 0);
+ gperl_hv_take_sv_s (hv, "age", newSViv (info->age));
return newRV_noinc ((SV *) hv);
}
diff --git a/xs/GtkSelection.xs b/xs/GtkSelection.xs
index 18521fd..81f8f38 100644
--- a/xs/GtkSelection.xs
+++ b/xs/GtkSelection.xs
@@ -48,9 +48,9 @@ newSVGtkTargetEntry (GtkTargetEntry * e)
h = newHV ();
r = newRV_noinc ((SV*)h);
- hv_store (h, "target", 6, e->target ? newSVpv (e->target, 0) : newSVsv (&PL_sv_undef), 0);
- hv_store (h, "flags", 5, newSVGtkTargetFlags (e->flags), 0);
- hv_store (h, "info", 4, newSViv (e->info), 0);
+ gperl_hv_take_sv_s (h, "target", e->target ? newSVpv (e->target, 0) : newSVsv (&PL_sv_undef));
+ gperl_hv_take_sv_s (h, "flags", newSVGtkTargetFlags (e->flags));
+ gperl_hv_take_sv_s (h, "info", newSViv (e->info));
return r;
}
diff --git a/xs/GtkStock.xs b/xs/GtkStock.xs
index 5f9475d..9d7be01 100644
--- a/xs/GtkStock.xs
+++ b/xs/GtkStock.xs
@@ -37,12 +37,12 @@ static SV *
newSVGtkStockItem (GtkStockItem * item)
{
HV * hv = newHV();
- hv_store (hv, "stock_id", 8, newSVGChar (item->stock_id), 0);
- hv_store (hv, "label", 5, newSVGChar (item->label), 0);
- hv_store (hv, "modifier", 8, newSVGdkModifierType (item->modifier), 0);
- hv_store (hv, "keyval", 6, newSVuv (item->keyval), 0);
+ gperl_hv_take_sv_s (hv, "stock_id", newSVGChar (item->stock_id));
+ gperl_hv_take_sv_s (hv, "label", newSVGChar (item->label));
+ gperl_hv_take_sv_s (hv, "modifier", newSVGdkModifierType (item->modifier));
+ gperl_hv_take_sv_s (hv, "keyval", newSVuv (item->keyval));
if (item->translation_domain)
- hv_store (hv, "translation_domain", 18, newSVGChar (item->translation_domain), 0);
+ gperl_hv_take_sv_s (hv, "translation_domain", newSVGChar (item->translation_domain));
return newRV_noinc ((SV *) hv);
}
diff --git a/xs/GtkTooltips.xs b/xs/GtkTooltips.xs
index 68fbc98..8cb6de4 100644
--- a/xs/GtkTooltips.xs
+++ b/xs/GtkTooltips.xs
@@ -88,13 +88,13 @@ gtk_tooltips_data_get (class, widget)
hv = newHV();
if (ret->tooltips)
- hv_store(hv, "tooltips", 8, newSVGtkTooltips(ret->tooltips),0);
+ gperl_hv_take_sv_s(hv, "tooltips", newSVGtkTooltips(ret->tooltips));
if (ret->widget)
- hv_store(hv, "widget", 6, newSVGtkWidget(GTK_WIDGET(ret->widget)),0);
+ gperl_hv_take_sv_s(hv, "widget", newSVGtkWidget(GTK_WIDGET(ret->widget)));
if (ret->tip_text)
- hv_store(hv, "tip_text", 8, newSVpv(ret->tip_text, PL_na),0);
+ gperl_hv_take_sv_s(hv, "tip_text", newSVpv(ret->tip_text, PL_na));
if (ret->tip_private)
- hv_store(hv, "tip_private", 11, newSVpv(ret->tip_private, PL_na),0);
+ gperl_hv_take_sv_s(hv, "tip_private", newSVpv(ret->tip_private, PL_na));
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]