Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/num_gmp_impl.h
/********************************************************************** | /********************************************************************** | ||||
* Copyright (c) 2013, 2014 Pieter Wuille * | * Copyright (c) 2013, 2014 Pieter Wuille * | ||||
* Distributed under the MIT software license, see the accompanying * | * Distributed under the MIT software license, see the accompanying * | ||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.* | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* | ||||
**********************************************************************/ | **********************************************************************/ | ||||
#ifndef _SECP256K1_NUM_REPR_IMPL_H_ | #ifndef SECP256K1_NUM_REPR_IMPL_H | ||||
#define _SECP256K1_NUM_REPR_IMPL_H_ | #define SECP256K1_NUM_REPR_IMPL_H | ||||
#include <string.h> | #include <string.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <gmp.h> | #include <gmp.h> | ||||
#include "util.h" | #include "util.h" | ||||
#include "num.h" | #include "num.h" | ||||
▲ Show 20 Lines • Show All 263 Lines • ▼ Show 20 Lines | while (r->limbs>1 && r->data[r->limbs-1]==0) { | ||||
r->limbs--; | r->limbs--; | ||||
} | } | ||||
} | } | ||||
static void secp256k1_num_negate(secp256k1_num *r) { | static void secp256k1_num_negate(secp256k1_num *r) { | ||||
r->neg ^= 1; | r->neg ^= 1; | ||||
} | } | ||||
#endif | #endif /* SECP256K1_NUM_REPR_IMPL_H */ |