gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] dangerous use of global data


From: strk
Subject: Re: [Gnash-dev] dangerous use of global data
Date: Sun, 12 Nov 2006 17:34:07 +0100

On Sun, Nov 12, 2006 at 03:26:28PM +0900, Hiroyuki Ikezoe wrote:
> Hello,
> 
> 2006-11-11 (土) の 12:21 +0100 に strk 
> さんは書きました:
> 
> > I'm now working on LogFile, which is another one.
> > This mail is just to let you know what I'm up to, and to warn
> > you about other such cases.
> > Gnash currently uses way too much globals, and we should protect
> > all of them inside ad-hoc classes with the sole purpose of providing
> > the global in a safe way.
> > Eventually, these classes could be stored in yet another container
> > object to represent a "run environment". This would allow us, for example,
> > to play multiple movies by the same exectutable file (not impossible).
> 
> I get the following error.
> 
> action_buffer.cpp:46: error: conversion from 'const
> gnash::SWF::SWFHandlers*' to non-scalar type 'gnash::SWF::SWFHandlers'
> requested

mm... weird, line 46 of action_buffer is:

  const gnash::SWF::SWFHandlers& ash = gnash::SWF::SWFHandlers::instance();

and SWFHandlers::instance is defined as (swf/ASHandlers.h):

  static const SWFHandlers& instance();

so, any idea where does you compiler get the info about that function
returning a pointer instead ?

> ../../server/swf/ASHandlers.h: In function 'void
> __static_initialization_and_destruction_0(int, int)':
> ../../server/swf/ASHandlers.h:268: error:
> 'gnash::SWF::SWFHandlers::~SWFHandlers()' is private
> action_buffer.cpp:46: error: within this context
> 
> 
> To make the destructor of SwFHandler public fixes the error, but I think
> it is not singleton-linke. I have no more idea about it.

Well, action_buffer should *not* need to destroy it.. it's a reference!
Anyway, you can try moving the 'ash' definition inside the function
that need to actually access that object, namely the 'disasm' function.

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]