Skip to main content

scpt_push_object_and_allocate2

Last updated March 2020

Name

scpt_push_object_and_allocate2 — Allocate room to hold a boxed C structure of a particular type

Synopsis

#include "modules/scriptlets/ec_scriptlet.h"

| void * **scpt_push_object_and_allocate2** ( | thr, |   | |   | objtype, |   | |   | typep, |   | |   | objsize); |   |

scpt_thread * <var class="pdparam">thr</var>; const char * <var class="pdparam">objtype</var>; scpt_objtype ** <var class="pdparam">typep</var>; size_t <var class="pdparam">objsize</var>;

Description

Allocate room to hold a boxed C structure of a particular type.

This is intended to be used by the generated glue code only.

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

Parameters

thr

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

objtype

The object type.

typep

The in/out parameter. For a discussion of this data type see “scpt_objtype”.

objsize

The object size.

Return Value

This function returns a pointer to the object.

Threading

It is legal to call this function in any thread.

See Also

Was this page helpful?