mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Added replacement stub for cstdlib atexit() funciton.
This is an empty stub to simply allow use of complex types with a non global static lifetime. For more complex handling the function 'atexit' can be redefined in user code. For more information see: https://github.com/arduino/Arduino/pull/2229 https://github.com/arduino/Arduino/issues/1919
This commit is contained in:
parent
e71bbf6011
commit
1bbcb2f9d4
@ -5,6 +5,7 @@ ARDUINO 1.0.6 - not yet released
|
||||
* avr: Improved USB-CDC write speed (Justin Rajewski)
|
||||
* avr: Improved USB-CDC read code (Paul Brook)
|
||||
* avr: Fixed race condition in USB-CDC transmit (Paul Brook)
|
||||
* avr: Added replacement stub for cstdlib atexit() funciton (Christopher Andrews)
|
||||
* Fixed wrong NULL pointer handling in Stream class (Amulya Kumar Sahoo)
|
||||
* Backported String class from IDE 1.5.x (Matt Jenkins)
|
||||
* Backported Print class from IDE 1.5.x
|
||||
|
@ -115,6 +115,8 @@ typedef uint8_t byte;
|
||||
void init(void);
|
||||
void initVariant(void);
|
||||
|
||||
int atexit(void (*func)()) __attribute__((weak));
|
||||
|
||||
void pinMode(uint8_t, uint8_t);
|
||||
void digitalWrite(uint8_t, uint8_t);
|
||||
int digitalRead(uint8_t);
|
||||
|
@ -19,6 +19,9 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
//Declared weak in Arduino.h to allow user redefinitions.
|
||||
int atexit(void (*func)()) { return 0; }
|
||||
|
||||
// Weak empty variant initialization function.
|
||||
// May be redefined by variant files.
|
||||
void initVariant() __attribute__((weak));
|
||||
|
Loading…
x
Reference in New Issue
Block a user