mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
Merge neptunus.(none):/home/msvensson/mysql/bug12715/my50-bug12715
into neptunus.(none):/home/msvensson/mysql/bug12715/my51-bug12715
This commit is contained in:
commit
d8ee800891
3 changed files with 3 additions and 10 deletions
|
@ -28,14 +28,11 @@
|
||||||
#define mySTL_HELPERS_HPP
|
#define mySTL_HELPERS_HPP
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <new> // placement new
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __IBMCPP__
|
|
||||||
/*
|
/*
|
||||||
Workaround for the lack of operator new(size_t, void*)
|
Workaround for the lack of operator new(size_t, void*)
|
||||||
in IBM VA C++ 6.0
|
in IBM VA C++ 6.0
|
||||||
|
Also used as a workaround to avoid including <new>
|
||||||
*/
|
*/
|
||||||
struct Dummy {};
|
struct Dummy {};
|
||||||
|
|
||||||
|
@ -45,9 +42,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef Dummy* yassl_pointer;
|
typedef Dummy* yassl_pointer;
|
||||||
#else
|
|
||||||
typedef void* yassl_pointer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace mySTL {
|
namespace mySTL {
|
||||||
|
|
|
@ -164,7 +164,7 @@ void list<T>::push_front(T t)
|
||||||
{
|
{
|
||||||
void* mem = malloc(sizeof(node));
|
void* mem = malloc(sizeof(node));
|
||||||
if (!mem) abort();
|
if (!mem) abort();
|
||||||
node* add = new (mem) node(t);
|
node* add = new (reinterpret_cast<yassl_pointer>(mem)) node(t);
|
||||||
|
|
||||||
if (head_) {
|
if (head_) {
|
||||||
add->next_ = head_;
|
add->next_ = head_;
|
||||||
|
@ -210,7 +210,7 @@ void list<T>::push_back(T t)
|
||||||
{
|
{
|
||||||
void* mem = malloc(sizeof(node));
|
void* mem = malloc(sizeof(node));
|
||||||
if (!mem) abort();
|
if (!mem) abort();
|
||||||
node* add = new (mem) node(t);
|
node* add = new (reinterpret_cast<yassl_pointer>(mem)) node(t);
|
||||||
|
|
||||||
if (tail_) {
|
if (tail_) {
|
||||||
tail_->next_ = add;
|
tail_->next_ = add;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include "runtime.hpp"
|
#include "runtime.hpp"
|
||||||
#include "misc.hpp"
|
#include "misc.hpp"
|
||||||
#include <new> // for NewHandler
|
|
||||||
|
|
||||||
|
|
||||||
void* operator new(size_t sz, TaoCrypt::new_t)
|
void* operator new(size_t sz, TaoCrypt::new_t)
|
||||||
|
|
Loading…
Add table
Reference in a new issue