mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Fixed build after changes in AutoPtr
This commit is contained in:
parent
5453f7c4d6
commit
359d4b89b3
@ -747,6 +747,12 @@ ExtEngineManager::ExtRoutine::ExtRoutine(thread_db* tdbb, ExtEngineManager* aExt
|
|||||||
engine->addRef();
|
engine->addRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ExtEngineManager::ExtRoutine::PluginDeleter::operator()(IPluginBase* ptr)
|
||||||
|
{
|
||||||
|
if (ptr)
|
||||||
|
PluginManagerInterfacePtr()->releasePlugin(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//---------------------
|
//---------------------
|
||||||
|
|
||||||
@ -770,7 +776,7 @@ ExtEngineManager::Function::~Function()
|
|||||||
|
|
||||||
void ExtEngineManager::Function::execute(thread_db* tdbb, UCHAR* inMsg, UCHAR* outMsg) const
|
void ExtEngineManager::Function::execute(thread_db* tdbb, UCHAR* inMsg, UCHAR* outMsg) const
|
||||||
{
|
{
|
||||||
EngineAttachmentInfo* attInfo = extManager->getEngineAttachment(tdbb, engine);
|
EngineAttachmentInfo* attInfo = extManager->getEngineAttachment(tdbb, engine.get());
|
||||||
const MetaString& userName = udf->invoker ? udf->invoker->getUserName() : "";
|
const MetaString& userName = udf->invoker ? udf->invoker->getUserName() : "";
|
||||||
ContextManager<IExternalFunction> ctxManager(tdbb, attInfo, function,
|
ContextManager<IExternalFunction> ctxManager(tdbb, attInfo, function,
|
||||||
(udf->getName().package.isEmpty() ?
|
(udf->getName().package.isEmpty() ?
|
||||||
@ -821,7 +827,7 @@ ExtEngineManager::ResultSet::ResultSet(thread_db* tdbb, UCHAR* inMsg, UCHAR* out
|
|||||||
attachment(tdbb->getAttachment()),
|
attachment(tdbb->getAttachment()),
|
||||||
firstFetch(true)
|
firstFetch(true)
|
||||||
{
|
{
|
||||||
attInfo = procedure->extManager->getEngineAttachment(tdbb, procedure->engine);
|
attInfo = procedure->extManager->getEngineAttachment(tdbb, procedure->engine.get());
|
||||||
const MetaString& userName = procedure->prc->invoker ? procedure->prc->invoker->getUserName() : "";
|
const MetaString& userName = procedure->prc->invoker ? procedure->prc->invoker->getUserName() : "";
|
||||||
ContextManager<IExternalProcedure> ctxManager(tdbb, attInfo, procedure->procedure,
|
ContextManager<IExternalProcedure> ctxManager(tdbb, attInfo, procedure->procedure,
|
||||||
(procedure->prc->getName().package.isEmpty() ?
|
(procedure->prc->getName().package.isEmpty() ?
|
||||||
@ -931,7 +937,7 @@ ExtEngineManager::Trigger::~Trigger()
|
|||||||
void ExtEngineManager::Trigger::execute(thread_db* tdbb, Request* request, unsigned action,
|
void ExtEngineManager::Trigger::execute(thread_db* tdbb, Request* request, unsigned action,
|
||||||
record_param* oldRpb, record_param* newRpb) const
|
record_param* oldRpb, record_param* newRpb) const
|
||||||
{
|
{
|
||||||
EngineAttachmentInfo* attInfo = extManager->getEngineAttachment(tdbb, engine);
|
EngineAttachmentInfo* attInfo = extManager->getEngineAttachment(tdbb, engine.get());
|
||||||
const TriState& ssDefiner = trg->ssDefiner.isAssigned() ? trg->ssDefiner :
|
const TriState& ssDefiner = trg->ssDefiner.isAssigned() ? trg->ssDefiner :
|
||||||
(trg->relation && trg->relation->rel_ss_definer.isAssigned() ? trg->relation->rel_ss_definer : TriState());
|
(trg->relation && trg->relation->rel_ss_definer.isAssigned() ? trg->relation->rel_ss_definer : TriState());
|
||||||
const MetaString& userName = ssDefiner.asBool() ?
|
const MetaString& userName = ssDefiner.asBool() ?
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
#define JRD_EXT_ENGINE_MANAGER_H
|
#define JRD_EXT_ENGINE_MANAGER_H
|
||||||
|
|
||||||
#include "firebird/Interface.h"
|
#include "firebird/Interface.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "../common/classes/array.h"
|
#include "../common/classes/array.h"
|
||||||
#include "../common/classes/fb_string.h"
|
#include "../common/classes/fb_string.h"
|
||||||
#include "../common/classes/GenericMap.h"
|
#include "../common/classes/GenericMap.h"
|
||||||
@ -216,9 +219,16 @@ public:
|
|||||||
ExtRoutine(thread_db* tdbb, ExtEngineManager* aExtManager,
|
ExtRoutine(thread_db* tdbb, ExtEngineManager* aExtManager,
|
||||||
Firebird::IExternalEngine* aEngine, RoutineMetadata* aMetadata);
|
Firebird::IExternalEngine* aEngine, RoutineMetadata* aMetadata);
|
||||||
|
|
||||||
|
private:
|
||||||
|
class PluginDeleter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void operator()(Firebird::IPluginBase* ptr);
|
||||||
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ExtEngineManager* extManager;
|
ExtEngineManager* extManager;
|
||||||
Firebird::AutoPlugin<Firebird::IExternalEngine> engine;
|
std::unique_ptr<Firebird::IExternalEngine, PluginDeleter> engine;
|
||||||
Firebird::AutoPtr<RoutineMetadata> metadata;
|
Firebird::AutoPtr<RoutineMetadata> metadata;
|
||||||
Database* database;
|
Database* database;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user