Re: [Vala] Allow passing ref/out as a pointer.




 There's two GL vapis in ExternalBinding page. I'm talking about
the one inside the brackets[0]. This is part of the vapi:
public static void glGenBuffers (GL.GLsizei n, [CCode (array_length = false, array_null_terminated = true)] 
out unowned GL.GLuint[] buffers);
public static void glDeleteBuffers (GL.GLsizei n, [CCode (array_length = false, array_null_terminated = 
true)] GL.GLuint[]? buffers);

The GL C API is:
void glGenBuffers (GLsize n, GLuint *buffers)
void glDeleteBuffers (GLsize n, GLuint *buffers)

Which n is the count of buffers, and buffers represent a pointer
to the first element.

The generation of method glGenBuffers is completely buggy (i.e.
failed even if I pass an GL.GLuint[] array).
However, the generation of the second method is OK.

Take a look at the first method. What the parameter should be?
Is it should be "out GL.GLuint first_element"?

Tal

[0] http://blazt.sablun.org/tmp/gl.vapi

Date: Sun, 15 Apr 2012 10:47:17 +0200
Subject: Re: [Vala] Allow passing ref/out as a pointer.
From: lethalman88 gmail com
To: tal_hd hotmail com
CC: vala-list gnome org

2012/4/15 Tal Hadad <tal_hd hotmail com>


Hello Luca

Even thought there are replacement for that, don't you think that this option is good?

Vala has full support of pointers except this.

I don't know unless you paste some code of what you're doing and of the vapi.
-- 
www.debian.org - The Universal Operating System
                                          


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]