|
Packit Service |
fa3ceb |
/*
|
|
Packit Service |
fa3ceb |
Samba trivial allocation library - compat functions
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
Copyright (C) Stefan Metzmacher 2009
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
** NOTE! The following LGPL license applies to the talloc
|
|
Packit Service |
fa3ceb |
** library. This does NOT imply that all of Samba is released
|
|
Packit Service |
fa3ceb |
** under the LGPL
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
This library is free software; you can redistribute it and/or
|
|
Packit Service |
fa3ceb |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
fa3ceb |
License as published by the Free Software Foundation; either
|
|
Packit Service |
fa3ceb |
version 3 of the License, or (at your option) any later version.
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
This library is distributed in the hope that it will be useful,
|
|
Packit Service |
fa3ceb |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
fa3ceb |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
fa3ceb |
Lesser General Public License for more details.
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
fa3ceb |
License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
fa3ceb |
*/
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
/*
|
|
Packit Service |
fa3ceb |
* This file contains only function to build a
|
|
Packit Service |
fa3ceb |
* compat talloc.so.1 library on top of talloc.so.2
|
|
Packit Service |
fa3ceb |
*/
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
#include "replace.h"
|
|
Packit Service |
fa3ceb |
#include "talloc.h"
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
void *_talloc_reference(const void *context, const void *ptr);
|
|
Packit Service |
fa3ceb |
void *_talloc_reference(const void *context, const void *ptr) {
|
|
Packit Service |
fa3ceb |
return _talloc_reference_loc(context, ptr,
|
|
Packit Service |
fa3ceb |
"Called from talloc compat1 "
|
|
Packit Service |
fa3ceb |
"_talloc_reference");
|
|
Packit Service |
fa3ceb |
}
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
void *_talloc_steal(const void *new_ctx, const void *ptr);
|
|
Packit Service |
fa3ceb |
void *_talloc_steal(const void *new_ctx, const void *ptr)
|
|
Packit Service |
fa3ceb |
{
|
|
Packit Service |
fa3ceb |
return talloc_reparent(talloc_parent(ptr), new_ctx, ptr);
|
|
Packit Service |
fa3ceb |
}
|
|
Packit Service |
fa3ceb |
|
|
Packit Service |
fa3ceb |
#undef talloc_free
|
|
Packit Service |
fa3ceb |
int talloc_free(void *ptr);
|
|
Packit Service |
fa3ceb |
int talloc_free(void *ptr)
|
|
Packit Service |
fa3ceb |
{
|
|
Packit Service |
fa3ceb |
return talloc_unlink(talloc_parent(ptr), ptr);
|
|
Packit Service |
fa3ceb |
}
|
|
Packit Service |
fa3ceb |
|