Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b3165152
Commit
b3165152
authored
Aug 16, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed some interfaces after error reports from Liberte.
Added altgetmatrix (better but incompatible).
parent
3fecef73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
3 deletions
+51
-3
Modules/cstubs
Modules/cstubs
+51
-3
No files found.
Modules/cstubs
View file @
b3165152
/*
Input used to generate the Python module "glmodule.c".
The stub generator is a Python script called "cgen".
The stub generator is a Python script called "cgen
.py
".
Each definition must be contained on one line:
...
...
@@ -491,6 +491,8 @@ static object *gl_endselect(self, args) object *self, *args; {
}
/* XXX The generator botches this one. Here's a quick hack to fix it. */
/* XXX The generator botches this one. Here's a quick hack to fix it. */
% getmatrix float r[16]
...
...
@@ -519,6 +521,46 @@ gl_getmatrix(self, args)
return v;
}
/* Here's an alternate version that returns a 4x4 matrix instead of
a vector. Unfortunately it is incompatible with loadmatrix and
multmatrix... */
% altgetmatrix float r[4][4]
static object *
gl_altgetmatrix(self, args)
object *self;
object *args;
{
float arg1 [ 4 ] [ 4 ] ;
object *v, *w;
int i, j;
getmatrix( arg1 );
v = newlistobject(4);
if (v == NULL) {
return NULL;
}
for (i = 0; i < 4; i++) {
w = newlistobject(4);
if (w == NULL) {
DECREF(v);
return NULL;
}
setlistitem(v, i, w);
}
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
w = mknewfloatobject(arg1[i][j]);
if (w == NULL) {
DECREF(v);
return NULL;
}
setlistitem(getlistitem(v, i), j, w);
}
}
return v;
}
/* End of manually written stubs */
%%
...
...
@@ -680,9 +722,13 @@ void rpmv2 float s float s
void xfpt2 float s float s
#
void loadmatrix float s[16]
# Really [4][4]
void multmatrix float s[16]
void crv float s[16]
# Really [4][4]
void crv float s[12]
# Really [4][3]
void rcrv float s[16]
# Really [4][4]
#
# Methods that have strings.
#
...
...
@@ -712,8 +758,10 @@ void polfs long s short s[3*arg1]
void polys long s short s[3*arg1]
void poly2s long s short s[2*arg1]
#
void defcursor short s short s[16]
void defcursor short s short s[128]
# Is this useful?
void writepixels short s short s[arg1]
# Should be unsigned short...
void defbasis long s float s[16]
void gewrite short s short s[arg1]
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment