C API: bool -> int, size_t included
This commit is contained in:
		
							parent
							
								
									48f8d12246
								
							
						
					
					
						commit
						6b262e2ddc
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -865,14 +865,13 @@ inline void RagePhoto::uInt32ToCharLE(uint32_t x, char *y)
 | 
				
			||||||
    y[3] = x >> 24;
 | 
					    y[3] = x >> 24;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// C API
 | 
					 | 
				
			||||||
#ifdef LIBRAGEPHOTO_C_API
 | 
					#ifdef LIBRAGEPHOTO_C_API
 | 
				
			||||||
ragephoto_t ragephoto_open()
 | 
					ragephoto_t ragephoto_open()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return new RagePhoto;
 | 
					    return new RagePhoto;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool ragephoto_load(ragephoto_t instance, const char *data, size_t size)
 | 
					int ragephoto_load(ragephoto_t instance, const char *data, size_t size)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    RagePhoto *ragePhoto = static_cast<RagePhoto*>(instance);
 | 
					    RagePhoto *ragePhoto = static_cast<RagePhoto*>(instance);
 | 
				
			||||||
    return ragePhoto->load(data, size);
 | 
					    return ragePhoto->load(data, size);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -176,6 +176,7 @@ extern "C" {
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#include "libragephoto_global.h"
 | 
					#include "libragephoto_global.h"
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
typedef void* ragephoto_t;
 | 
					typedef void* ragephoto_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -189,7 +190,7 @@ LIBRAGEPHOTO_EXPORT ragephoto_t ragephoto_open();
 | 
				
			||||||
* \param data Photo data
 | 
					* \param data Photo data
 | 
				
			||||||
* \param size Photo data size
 | 
					* \param size Photo data size
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
LIBRAGEPHOTO_EXPORT bool ragephoto_load(ragephoto_t instance, const char *data, size_t size);
 | 
					LIBRAGEPHOTO_EXPORT int ragephoto_load(ragephoto_t instance, const char *data, size_t size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Returns the Photo JPEG data.
 | 
					/** Returns the Photo JPEG data.
 | 
				
			||||||
* \param instance \p ragephoto_t instance
 | 
					* \param instance \p ragephoto_t instance
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue