Unverified Commit 39e4c2d7 authored by Mike Wey's avatar Mike Wey Committed by GitHub

Merge pull request #240 from ximion/master

Some wrap file additions
parents 912eaa1b 0bbe149c
......@@ -708,6 +708,26 @@ class: Pattern
struct: PtrArray
class: PtrArray
code: start
/**
* Number of pointers in the array
*/
public uint len() pure
{
return gPtrArray.len;
}
/**
* Returns the pointer at the given index of the pointer array.
*
* This does not perform bounds checking on the given index, so
* you are responsible for checking it against the array length.
*/
public void* index(uint idx)
{
return (gPtrArray.pdata)[idx];
}
code: end
struct: Queue
class: QueueG
......@@ -1130,7 +1150,7 @@ code: start
* Convert C-style 0 terminated string s to char[] string.
* copied from phobos
*/
public static string toString(const(char)* s, size_t len = 0)
public static string toString(const(char)* s, size_t len = 0) pure
{
if ( s is null )
return cast(string)null;
......@@ -1145,7 +1165,7 @@ code: start
* Convert array of chars s[] to a C-style 0 terminated string.
* copied from phobos
*/
public static char* toStringz(string s)
public static char* toStringz(string s) pure
{
if ( s is null ) return null;
char[] copy;
......@@ -1166,7 +1186,7 @@ code: start
}
/** */
public static char** toStringzArray(string[] args)
public static char** toStringzArray(string[] args) pure
{
if ( args is null )
{
......@@ -1184,7 +1204,7 @@ code: start
}
/** */
public static char*** toStringzArray(string[][] args)
public static char*** toStringzArray(string[][] args) pure
{
if ( args is null )
{
......@@ -1202,7 +1222,7 @@ code: start
}
/** */
public static string[] toStringArray(const(char*)* args)
public static string[] toStringArray(const(char*)* args) pure
{
if ( args is null )
{
......@@ -1220,7 +1240,7 @@ code: start
}
/** */
public static string[] toStringArray(const(char*)* args, size_t len)
public static string[] toStringArray(const(char*)* args, size_t len) pure
{
string[] argv = new string[len];
......@@ -1233,7 +1253,7 @@ code: start
}
/** */
public static string[][] toStringArray(char*** args)
public static string[][] toStringArray(char*** args) pure
{
string[][] argv;
......
......@@ -369,7 +369,6 @@ code: end
struct: Object
import: core.memory
import: gobject.Signals
import: gtkd.Loader
import: std.algorithm
import: std.traits
merge: InitiallyUnowned
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment