add more "const" decls

This commit is contained in:
John Cupitt 2020-03-05 13:09:28 +00:00
parent 9070b6d71b
commit 7b26bd1fdf
6 changed files with 60 additions and 41 deletions

View File

@ -562,7 +562,7 @@ vips_boolean_const_init( VipsBooleanConst *boolean_const )
static int static int
vips_boolean_constv( VipsImage *in, VipsImage **out, vips_boolean_constv( VipsImage *in, VipsImage **out,
VipsOperationBoolean operation, double *c, int n, va_list ap ) VipsOperationBoolean operation, const double *c, int n, va_list ap )
{ {
VipsArea *area_c; VipsArea *area_c;
double *array; double *array;
@ -609,7 +609,7 @@ vips_boolean_constv( VipsImage *in, VipsImage **out,
*/ */
int int
vips_boolean_const( VipsImage *in, VipsImage **out, vips_boolean_const( VipsImage *in, VipsImage **out,
VipsOperationBoolean boolean, double *c, int n, ... ) VipsOperationBoolean boolean, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -637,7 +637,8 @@ vips_boolean_const( VipsImage *in, VipsImage **out,
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_andimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_andimage_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -666,7 +667,8 @@ vips_andimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_orimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_orimage_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -695,7 +697,8 @@ vips_orimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_eorimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_eorimage_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -724,7 +727,7 @@ vips_eorimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_lshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_lshift_const( VipsImage *in, VipsImage **out, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -753,7 +756,7 @@ vips_lshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_rshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_rshift_const( VipsImage *in, VipsImage **out, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;

View File

@ -453,7 +453,7 @@ vips_linear_init( VipsLinear *linear )
static int static int
vips_linearv( VipsImage *in, VipsImage **out, vips_linearv( VipsImage *in, VipsImage **out,
double *a, double *b, int n, va_list ap ) const double *a, const double *b, int n, va_list ap )
{ {
VipsArea *area_a; VipsArea *area_a;
VipsArea *area_b; VipsArea *area_b;
@ -500,7 +500,8 @@ vips_linearv( VipsImage *in, VipsImage **out,
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_linear( VipsImage *in, VipsImage **out, double *a, double *b, int n, ... ) vips_linear( VipsImage *in, VipsImage **out,
const double *a, const double *b, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;

View File

@ -420,7 +420,7 @@ vips_math2_const_init( VipsMath2Const *math2_const )
static int static int
vips_math2_constv( VipsImage *in, VipsImage **out, vips_math2_constv( VipsImage *in, VipsImage **out,
VipsOperationMath2 math2, double *c, int n, va_list ap ) VipsOperationMath2 math2, const double *c, int n, va_list ap )
{ {
VipsArea *area_c; VipsArea *area_c;
double *array; double *array;
@ -470,7 +470,7 @@ vips_math2_constv( VipsImage *in, VipsImage **out,
*/ */
int int
vips_math2_const( VipsImage *in, VipsImage **out, vips_math2_const( VipsImage *in, VipsImage **out,
VipsOperationMath2 math2, double *c, int n, ... ) VipsOperationMath2 math2, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -496,7 +496,7 @@ vips_math2_const( VipsImage *in, VipsImage **out,
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_pow_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_pow_const( VipsImage *in, VipsImage **out, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -523,7 +523,7 @@ vips_pow_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_wop_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_wop_const( VipsImage *in, VipsImage **out, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;

View File

@ -598,7 +598,7 @@ vips_relational_const_init( VipsRelationalConst *relational_const )
static int static int
vips_relational_constv( VipsImage *in, VipsImage **out, vips_relational_constv( VipsImage *in, VipsImage **out,
VipsOperationRelational relational, double *c, int n, va_list ap ) VipsOperationRelational relational, const double *c, int n, va_list ap )
{ {
VipsArea *area_c; VipsArea *area_c;
double *array; double *array;
@ -645,7 +645,7 @@ vips_relational_constv( VipsImage *in, VipsImage **out,
*/ */
int int
vips_relational_const( VipsImage *in, VipsImage **out, vips_relational_const( VipsImage *in, VipsImage **out,
VipsOperationRelational relational, double *c, int n, ... ) VipsOperationRelational relational, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -671,7 +671,7 @@ vips_relational_const( VipsImage *in, VipsImage **out,
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_equal_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_equal_const( VipsImage *in, VipsImage **out, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -698,7 +698,8 @@ vips_equal_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_notequal_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_notequal_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -725,7 +726,7 @@ vips_notequal_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_less_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_less_const( VipsImage *in, VipsImage **out, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -752,7 +753,7 @@ vips_less_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_lesseq_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_lesseq_const( VipsImage *in, VipsImage **out, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -779,7 +780,7 @@ vips_lesseq_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_more_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_more_const( VipsImage *in, VipsImage **out, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;
@ -806,7 +807,7 @@ vips_more_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_moreeq_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_moreeq_const( VipsImage *in, VipsImage **out, const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;

View File

@ -333,7 +333,7 @@ vips_remainder_const_init( VipsRemainderConst *remainder_const )
static int static int
vips_remainder_constv( VipsImage *in, VipsImage **out, vips_remainder_constv( VipsImage *in, VipsImage **out,
double *c, int n, va_list ap ) const double *c, int n, va_list ap )
{ {
VipsArea *area_c; VipsArea *area_c;
double *array; double *array;
@ -379,7 +379,8 @@ vips_remainder_constv( VipsImage *in, VipsImage **out,
* Returns: 0 on success, -1 on error * Returns: 0 on success, -1 on error
*/ */
int int
vips_remainder_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) vips_remainder_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
{ {
va_list ap; va_list ap;
int result; int result;

View File

@ -185,14 +185,14 @@ int vips_multiply( VipsImage *left, VipsImage *right, VipsImage **out, ... )
int vips_divide( VipsImage *left, VipsImage *right, VipsImage **out, ... ) int vips_divide( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_linear( VipsImage *in, VipsImage **out, int vips_linear( VipsImage *in, VipsImage **out,
double *a, double *b, int n, ... ) const double *a, const double *b, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_linear1( VipsImage *in, VipsImage **out, double a, double b, ... ) int vips_linear1( VipsImage *in, VipsImage **out, double a, double b, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_remainder( VipsImage *left, VipsImage *right, VipsImage **out, ... ) int vips_remainder( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_remainder_const( VipsImage *in, VipsImage **out, int vips_remainder_const( VipsImage *in, VipsImage **out,
double *c, int n, ... ) const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_remainder_const1( VipsImage *in, VipsImage **out, int vips_remainder_const1( VipsImage *in, VipsImage **out,
double c, ... ) double c, ... )
@ -279,19 +279,25 @@ int vips_more( VipsImage *left, VipsImage *right, VipsImage **out, ... )
int vips_moreeq( VipsImage *left, VipsImage *right, VipsImage **out, ... ) int vips_moreeq( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_relational_const( VipsImage *in, VipsImage **out, int vips_relational_const( VipsImage *in, VipsImage **out,
VipsOperationRelational relational, double *c, int n, ... ) VipsOperationRelational relational, const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_equal_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_equal_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_notequal_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_notequal_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_less_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_less_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_lesseq_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_lesseq_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_more_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_more_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_moreeq_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_moreeq_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_relational_const1( VipsImage *in, VipsImage **out, int vips_relational_const1( VipsImage *in, VipsImage **out,
VipsOperationRelational relational, double c, ... ) VipsOperationRelational relational, double c, ... )
@ -324,17 +330,22 @@ int vips_rshift( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_boolean_const( VipsImage *in, VipsImage **out, int vips_boolean_const( VipsImage *in, VipsImage **out,
VipsOperationBoolean boolean, double *c, int n, ... ) VipsOperationBoolean boolean, const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_andimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_andimage_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_orimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_orimage_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_eorimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_eorimage_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_lshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_lshift_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_rshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_rshift_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_boolean_const1( VipsImage *in, VipsImage **out, int vips_boolean_const1( VipsImage *in, VipsImage **out,
VipsOperationBoolean boolean, double c, ... ) VipsOperationBoolean boolean, double c, ... )
@ -358,11 +369,13 @@ int vips_pow( VipsImage *left, VipsImage *right, VipsImage **out, ... )
int vips_wop( VipsImage *left, VipsImage *right, VipsImage **out, ... ) int vips_wop( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_math2_const( VipsImage *in, VipsImage **out, int vips_math2_const( VipsImage *in, VipsImage **out,
VipsOperationMath2 math2, double *c, int n, ... ) VipsOperationMath2 math2, const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_pow_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_pow_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_wop_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) int vips_wop_const( VipsImage *in, VipsImage **out,
const double *c, int n, ... )
__attribute__((sentinel)); __attribute__((sentinel));
int vips_math2_const1( VipsImage *in, VipsImage **out, int vips_math2_const1( VipsImage *in, VipsImage **out,
VipsOperationMath2 math2, double c, ... ) VipsOperationMath2 math2, double c, ... )