File: typemap

package info (click to toggle)
libcpanel-json-xs-perl 4.39-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,872 kB
  • sloc: perl: 1,165; makefile: 8
file content (19 lines) | stat: -rw-r--r-- 496 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
JSON *		T_JSON

INPUT

T_JSON
        dMY_CXT;
	if (!(
           SvROK ($arg)
           && SvOBJECT (SvRV ($arg))
           && (SvSTASH (SvRV ($arg)) == JSON_STASH || sv_derived_from ($arg, \"Cpanel::JSON::XS\"))
        )) {
          if (SvPOK ($arg))
            croak (\"string is not of type Cpanel::JSON::XS. You need to create the object with new\");
          else
            croak (\"object is not of type Cpanel::JSON::XS\");
        }
        $var = (JSON *)SvPVX (SvRV ($arg));