Skip to main content

scpt_push_object_by_typename

Last updated March 2020

Name

scpt_push_object_by_typename — box a C structure to pass into a scriptlet routine

Synopsis

#include "modules/scriptlets/ec_scriptlet.h"

| void **scpt_push_object_by_typename** ( | thr, |   | |   | type_name, |   | |   | typep, |   | |   | object, |   | |   | flags); |   |

scpt_thread * <var class="pdparam">thr</var>; const char * <var class="pdparam">type_name</var>; scpt_objtype ** <var class="pdparam">typep</var>; void * <var class="pdparam">object</var>; int <var class="pdparam">flags</var>;

Description

**Configuration Change. ** This feature is available starting from Momentum 3.2.

Box a C structure to pass it into a scriptlet routine.

Parameters

thr

The script thread. For a description of this data type see “scpt_thread”.

typename

The name of the type of object being pushed.

typep

The in/out parameter. For a description of this data typer see “scpt_objtype”.

object

The object being pushed.

flags

Flags affecting the push operation.

If typep is NULL, it will be ignored. Otherwise, it points to an instance of scpt_objtype that may be NULL. If it is NULL, upon return from scpt_push_object_by_typename, that instance will be set to the scpt_objtype corresponding to the objtype string. If typep is not NULL upon entry to scpt_push_object_by_typename, it will be used in preference to objtype and this function call will be equivalent to scpt_push_object4().

The intended usage scenario for typep is for a call sequence similar to that below, where the objtype string is constant; a static variable can be used to cache the resolved form of the type string, saving hash lookups in the common case:

static scpt_objtype *type = NULL;

scpt_push_object_by_typename(thr, "msys.core:_ec_string", &type, str, 0);

Parameters

thr

The script thread. For a description of this data type see “scpt_thread”.

value

The double that you wish to push.

Return Value

This function returns void.

Threading

It is legal to call this function in any thread.

See Also

Was this page helpful?