File: gperl-i11n-gvalue.c

package info (click to toggle)
libglib-object-introspection-perl 0.048-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 544 kB
  • sloc: ansic: 3,468; perl: 2,785; makefile: 9; sh: 3
file content (21 lines) | stat: -rw-r--r-- 479 bytes parent folder | download | duplicates (5)
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;
}