- if ($actual_ctype->{TYPE} eq "SCALAR" and
- expandAlias($actual_ctype->{NAME}) eq "DATA_BLOB") {
- return "PyString_FromStringAndSize($cvar->data, $cvar->length)";
- }
-
- if ($ctype->{TYPE} eq "STRUCT" or $ctype->{TYPE} eq "UNION") {
- return "py_import_$ctype->{TYPE}_$ctype->{NAME}($cvar)";
- }
-
- if ($actual_ctype->{TYPE} eq "SCALAR" and $actual_ctype->{NAME} eq "NTSTATUS") {
- return "PyInt_FromLong(NT_STATUS_V($cvar))";
- }
-
- if ($actual_ctype->{TYPE} eq "SCALAR" and $actual_ctype->{NAME} eq "WERROR") {
- return "PyInt_FromLong(W_ERROR_V($cvar))";
- }
-
- if ($actual_ctype->{TYPE} eq "SCALAR" and
- ($actual_ctype->{NAME} eq "string" or $actual_ctype->{NAME} eq "nbt_string" or $actual_ctype->{NAME} eq "nbt_name" or $actual_ctype->{NAME} eq "wrepl_nbt_name")) {
- return "PyString_FromString($cvar)";
- }
-
- if ($actual_ctype->{TYPE} eq "SCALAR" and $actual_ctype->{NAME} eq "string_array") {
- return "FIXME($cvar)";
- }
-
- if ($actual_ctype->{TYPE} eq "SCALAR" and $actual_ctype->{NAME} eq "ipv4address") {
- return "FIXME($cvar)";
- }
-
- if ($actual_ctype->{TYPE} eq "SCALAR" and $actual_ctype->{NAME} eq "pointer") {
- return "PyCObject_FromVoidPtr($cvar, talloc_free)";
- }
-