File: gperl-i11n-gvalue.c

package info (click to toggle)
libglib-object-introspection-perl 0.042-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 512 kB
  • ctags: 211
  • sloc: ansic: 3,396; perl: 2,599; makefile: 9
file content (21 lines) | stat: -rw-r--r-- 479 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* -*- mode: c; indent-tabs-mode: t; c-basic-offset: 8; -*- */

/* Semi-private package for marshalling into GValues. */
#define GVALUE_WRAPPER_PACKAGE "Glib::Object::Introspection::GValueWrapper"

static GValue *
SvGValueWrapper (SV *sv)
{
	return sv_derived_from (sv, GVALUE_WRAPPER_PACKAGE)
		? INT2PTR (GValue*, SvIV (SvRV (sv)))
		: NULL;
}

static SV *
newSVGValueWrapper (GValue *v)
{
	SV *sv;
	sv = newSV (0);
	sv_setref_pv (sv, GVALUE_WRAPPER_PACKAGE, v);
	return sv;
}