From c50b605dfc2024bf5bca7d6dfb18fc266b358978 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Wed, 13 Jun 2012 22:26:54 +0400 Subject: Support casting references and allocating arrays of numbers in lua wrapper. --- Lua API.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Lua API.html') diff --git a/Lua API.html b/Lua API.html index 02e7abf3..2df8a7f2 100644 --- a/Lua API.html +++ b/Lua API.html @@ -615,6 +615,20 @@ lightuserdata (step is mandatory then).

  • df.is_instance(type,obj)

    Equivalent to the method, but also allows a reference as proxy for its type.

  • +
  • df.new(ptype[,count])

    +

    Allocate a new instance, or an array of built-in types. +The ptype argument is a string from the following list: +string, int8_t, uint8_t, int16_t, uint16_t, +int32_t, uint32_t, int64_t, uint64_t, bool, +float, double. All of these except string can be +used with the count argument to allocate an array.

    +
  • +
  • df.reinterpret_cast(type,ptr)

    +

    Converts ptr to a ref of specified type. The type may be anything +acceptable to df.is_instance. Ptr may be nil, a ref, +a lightuserdata, or a number.

    +

    Returns nil if NULL, or a ref.

    +
  • -- cgit v1.2.1