Permalink
Browse files

Fixed const return values in the AssImp binding, as they were declare…

…d incorrectly. Adjusted const parameter declarations while I was at it, for consistency with the other bindings.
  • Loading branch information...
1 parent 9f0e860 commit 2c0176cabeac73299dfa60e708e03b31503736bb @mdparker committed May 28, 2012
Showing with 21 additions and 18 deletions.
  1. +3 −0 build/derelict.d
  2. +18 −18 import/derelict/assimp/functions.d
View
@@ -70,6 +70,7 @@ enum packSDL2 = "DerelictSDL2";
enum packODE = "DerelictODE";
enum packASSIMP = "DerelictASSIMP";
enum packFG = "DerelictFreeGLUT";
+enum packSFML2 = "DerelictSFML2";
// Source paths
enum srcDerelict = "../import/derelict/";
@@ -84,6 +85,7 @@ enum srcSDL2 = srcDerelict ~ "sdl2/";
enum srcODE = srcDerelict ~ "ode/";
enum srcASSIMP = srcDerelict ~ "assimp/";
enum srcFG = srcDerelict ~ "freeglut/";
+enum srcSFML2 = srcDerelict ~ "sfml2/";
// Map package names to source paths.
string[string] pathMap;
@@ -104,6 +106,7 @@ static this()
packODE : srcODE,
packASSIMP : srcASSIMP,
packFG : srcFG,
+ packSFML2 : srcSFML2,
];
}
@@ -34,34 +34,34 @@ private
extern(C)
{
- alias nothrow const aiScene* function(const char*, uint) da_aiImportFile;
- alias nothrow const aiScene* function(const char*, uint, aiFileIO*) da_aiImportFileEx;
- alias nothrow const aiScene* function(const char*, uint, uint, const char*) da_aiImportFileFromMemory;
- alias nothrow const aiScene* function(const aiScene*, uint) da_aiApplyPostProcessing;
- alias nothrow aiLogStream function(aiDefaultLogStream, const char*) da_aiGetPredefinedLogStream;
- alias nothrow void function(const aiLogStream*) da_aiAttachLogStream;
+ alias nothrow const(aiScene)* function(const(char)*, uint) da_aiImportFile;
+ alias nothrow const(aiScene)* function(const(char)*, uint, aiFileIO*) da_aiImportFileEx;
+ alias nothrow const(aiScene)* function(const(char)*, uint, uint, const(char)*) da_aiImportFileFromMemory;
+ alias nothrow const(aiScene)* function(const(aiScene)*, uint) da_aiApplyPostProcessing;
+ alias nothrow aiLogStream function(aiDefaultLogStream, const(char)*) da_aiGetPredefinedLogStream;
+ alias nothrow void function(const(aiLogStream)*) da_aiAttachLogStream;
alias nothrow void function(aiBool) da_aiEnableVerboseLogging;
- alias nothrow aiReturn function(const aiLogStream*) da_aiDetachLogStream;
+ alias nothrow aiReturn function(const(aiLogStream)*) da_aiDetachLogStream;
alias nothrow void function() da_aiDetachAllLogStreams;
- alias nothrow void function(const aiScene*) da_aiReleaseImport;
- alias nothrow const char* function() da_aiGetErrorString;
- alias nothrow aiBool function(const char*) da_aiIsExtensionSupported;
+ alias nothrow void function(const(aiScene)*) da_aiReleaseImport;
+ alias nothrow const(char)* function() da_aiGetErrorString;
+ alias nothrow aiBool function(const(char)*) da_aiIsExtensionSupported;
alias nothrow void function(aiString*) da_aiGetExtensionList;
- alias nothrow void function(const aiScene*, aiMemoryInfo*) da_aiGetMemoryRequirements;
- alias nothrow void function(const char*, int) da_aiSetImportPropertyInteger;
- alias nothrow void function(const char*, float) da_aiSetImportPropertyFloat;
- alias nothrow void function(const char*, const aiString*) da_aiSetImportPropertyString;
- alias nothrow void function(aiQuaternion*, const aiMatrix3x3*) da_aiCreateQuaternionFromMatrix;
+ alias nothrow void function(const(aiScene)*, aiMemoryInfo*) da_aiGetMemoryRequirements;
+ alias nothrow void function(const(char)*, int) da_aiSetImportPropertyInteger;
+ alias nothrow void function(const(char)*, float) da_aiSetImportPropertyFloat;
+ alias nothrow void function(const(char)*, const(aiString)*) da_aiSetImportPropertyString;
+ alias nothrow void function(aiQuaternion*, const(aiMatrix3x3)*) da_aiCreateQuaternionFromMatrix;
alias nothrow void function(const aiMatrix4x4*, aiVector3D*, aiQuaternion*, aiVector3D*) da_aiDecomposeMatrix;
alias nothrow void function(aiMatrix4x4*) da_aiTransposeMatrix4;
alias nothrow void function(aiMatrix3x3*) da_aiTransposeMatrix3;
- alias nothrow void function(aiVector3D*, const aiMatrix3x3*) da_aiTransformVecByMatrix3;
- alias nothrow void function(aiVector3D*, const aiMatrix4x4*) da_aiTransformVecByMatrix4;
+ alias nothrow void function(aiVector3D*, const(aiMatrix3x3)*) da_aiTransformVecByMatrix3;
+ alias nothrow void function(aiVector3D*, const(aiMatrix4x4)*) da_aiTransformVecByMatrix4;
alias nothrow void function(aiMatrix4x4*) da_aiMultiplyMatrix4;
alias nothrow void function(aiMatrix3x3*) da_aiMultiplyMatrix3;
alias nothrow void function(aiMatrix3x3*) da_aiIdentityMatrix3;
alias nothrow void function(aiMatrix4x4*) da_aiIdentityMatrix4;
- alias nothrow const char* function() da_aiGetLegalString;
+ alias nothrow const(char)* function() da_aiGetLegalString;
alias nothrow uint function() da_aiGetVersionMinor;
alias nothrow uint function() da_aiGetVersionMajor;
alias nothrow uint function() da_aiGetVersionRevision;

2 comments on commit 2c0176c

Contributor

svenstaro replied Jun 2, 2012

Oh, sorry for that.

Owner

mdparker replied Jun 2, 2012

No worries.

Please sign in to comment.