/*This is used to cast from the Bullet.Vector_3 type and the Bullet.Real[] type.*/
float* bullet_vector_3_CastToRealArray (BulletVector_3* vector, int* result_length1) {
	float* _tmp0_;
	float* _tmp1_;
	_tmp0_ = NULL;
	_tmp1_ = NULL;
	return (_tmp1_ = (_tmp0_ = vector->Q, (_tmp0_ == NULL) ? ((gpointer) _tmp0_) : _vala_array_dup1 (_tmp0_, vector->Q_length1)), *result_length1 = vector->Q_length1, _tmp1_);
}
Example #2
0
static void deja_dup_async_command_set_argv (DejaDupAsyncCommand* self, gchar** value, int value_length1) {
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp0__length1 = value_length1;
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup1 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
	_tmp1__length1 = _tmp0__length1;
	self->priv->_argv = (_vala_array_free (self->priv->_argv, self->priv->_argv_length1, (GDestroyNotify) g_free), NULL);
	self->priv->_argv = _tmp1_;
	self->priv->_argv_length1 = _tmp1__length1;
	self->priv->__argv_size_ = self->priv->_argv_length1;
	g_object_notify ((GObject *) self, "argv");
}
Example #3
0
static gchar* skk_encoding_converter_convert (SkkEncodingConverter* self, GCharsetConverter* converter, const gchar* str, GError** error) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	guint8* _tmp1_;
	gint _tmp1__length1;
	guint8* _tmp2_;
	gint _tmp2__length1;
	guint8* _tmp3_;
	gint _tmp3__length1;
	guint8* inbuf;
	gint inbuf_length1;
	gint _inbuf_size_;
	guint8* _tmp4_ = NULL;
	guint8* outbuf;
	gint outbuf_length1;
	gint _outbuf_size_;
	GString* _tmp5_;
	GString* builder;
	gsize total_bytes_read;
	GString* _tmp26_;
	const gchar* _tmp27_;
	gchar* _tmp28_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (converter != NULL, NULL);
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = str;
	_tmp1_ = string_get_data (_tmp0_, &_tmp1__length1);
	_tmp2_ = _tmp1_;
	_tmp2__length1 = _tmp1__length1;
	_tmp3_ = (_tmp2_ != NULL) ? _vala_array_dup1 (_tmp2_, _tmp2__length1) : ((gpointer) _tmp2_);
	_tmp3__length1 = _tmp2__length1;
	inbuf = _tmp3_;
	inbuf_length1 = _tmp3__length1;
	_inbuf_size_ = inbuf_length1;
	_tmp4_ = g_new0 (guint8, SKK_ENCODING_CONVERTER_BUFSIZ);
	outbuf = _tmp4_;
	outbuf_length1 = SKK_ENCODING_CONVERTER_BUFSIZ;
	_outbuf_size_ = outbuf_length1;
	_tmp5_ = g_string_new ("");
	builder = _tmp5_;
	total_bytes_read = (gsize) 0;
	while (TRUE) {
		gsize _tmp6_;
		guint8* _tmp7_;
		gint _tmp7__length1;
		gsize bytes_read = 0UL;
		gsize bytes_written = 0UL;
		GCharsetConverter* _tmp8_;
		guint8* _tmp9_;
		gint _tmp9__length1;
		gsize _tmp10_;
		guint8* _tmp11_;
		gint _tmp11__length1;
		guint8* _tmp12_;
		gint _tmp12__length1;
		gsize _tmp13_ = 0UL;
		gsize _tmp14_ = 0UL;
		gsize _tmp24_;
		gsize _tmp25_;
		_tmp6_ = total_bytes_read;
		_tmp7_ = inbuf;
		_tmp7__length1 = inbuf_length1;
		if (!(_tmp6_ < ((gsize) _tmp7__length1))) {
			break;
		}
		_tmp8_ = converter;
		_tmp9_ = inbuf;
		_tmp9__length1 = inbuf_length1;
		_tmp10_ = total_bytes_read;
		_tmp11_ = inbuf;
		_tmp11__length1 = inbuf_length1;
		_tmp12_ = outbuf;
		_tmp12__length1 = outbuf_length1;
		g_converter_convert ((GConverter*) _tmp8_, _tmp9_ + _tmp10_, (gsize) (_tmp11__length1 - _tmp10_), _tmp12_, (gsize) _tmp12__length1, G_CONVERTER_INPUT_AT_END, &_tmp13_, &_tmp14_, &_inner_error_);
		bytes_read = _tmp13_;
		bytes_written = _tmp14_;
		if (_inner_error_ != NULL) {
			g_propagate_error (error, _inner_error_);
			_g_string_free0 (builder);
			outbuf = (g_free (outbuf), NULL);
			inbuf = (g_free (inbuf), NULL);
			return NULL;
		}
		{
			gint i;
			i = 0;
			{
				gboolean _tmp15_;
				_tmp15_ = TRUE;
				while (TRUE) {
					gboolean _tmp16_;
					gint _tmp18_;
					gsize _tmp19_;
					GString* _tmp20_;
					guint8* _tmp21_;
					gint _tmp21__length1;
					gint _tmp22_;
					guint8 _tmp23_;
					_tmp16_ = _tmp15_;
					if (!_tmp16_) {
						gint _tmp17_;
						_tmp17_ = i;
						i = _tmp17_ + 1;
					}
					_tmp15_ = FALSE;
					_tmp18_ = i;
					_tmp19_ = bytes_written;
					if (!(((gsize) _tmp18_) < _tmp19_)) {
						break;
					}
					_tmp20_ = builder;
					_tmp21_ = outbuf;
					_tmp21__length1 = outbuf_length1;
					_tmp22_ = i;
					_tmp23_ = _tmp21_[_tmp22_];
					g_string_append_c (_tmp20_, (gchar) _tmp23_);
				}
			}
		}
		_tmp24_ = total_bytes_read;
		_tmp25_ = bytes_read;
		total_bytes_read = _tmp24_ + _tmp25_;
	}
	_tmp26_ = builder;
	_tmp27_ = _tmp26_->str;
	_tmp28_ = g_strdup (_tmp27_);
	result = _tmp28_;
	_g_string_free0 (builder);
	outbuf = (g_free (outbuf), NULL);
	inbuf = (g_free (inbuf), NULL);
	return result;
}
Example #4
0
void mathg_math_cog_copy (const mathgMathCog* self, mathgMathCog* dest) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	gdouble _tmp4_ = 0.0;
	gboolean _tmp5_ = FALSE;
	mathgNumberUtils _tmp6_ = {0};
	mathgOperate _tmp7_ = {0};
	mathgOperate _tmp8_ = {0};
	gint _tmp9_ = 0;
	mathgMyTimer _tmp10_ = {0};
	mathgMyTimer _tmp11_ = {0};
	const gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	mathgElmnt* _tmp14_ = NULL;
	gint _tmp14__length1 = 0;
	mathgElmnt* _tmp15_ = NULL;
	gint _tmp15__length1 = 0;
	gint _tmp16_ = 0;
	mathgMyTimer _tmp17_ = {0};
	mathgMyTimer _tmp18_ = {0};
	_tmp0_ = (*self).ch;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).ch);
	(*dest).ch = _tmp1_;
	_tmp2_ = (*self).cor;
	(*dest).cor = _tmp2_;
	_tmp3_ = (*self).deviation;
	(*dest).deviation = _tmp3_;
	_tmp4_ = (*self).err;
	(*dest).err = _tmp4_;
	_tmp5_ = (*self).isenter;
	(*dest).isenter = _tmp5_;
	_tmp6_ = (*self).nu;
	(*dest).nu = _tmp6_;
	_tmp7_ = (*self).operation;
	mathg_operate_copy (&_tmp7_, &_tmp8_);
	mathg_operate_destroy (&(*dest).operation);
	(*dest).operation = _tmp8_;
	_tmp9_ = (*self).pm;
	(*dest).pm = _tmp9_;
	_tmp10_ = (*self).problem;
	mathg_my_timer_copy (&_tmp10_, &_tmp11_);
	mathg_my_timer_destroy (&(*dest).problem);
	(*dest).problem = _tmp11_;
	_tmp12_ = (*self).res;
	_tmp13_ = g_strdup (_tmp12_);
	_g_free0 ((*dest).res);
	(*dest).res = _tmp13_;
	_tmp14_ = (*self).stra;
	_tmp14__length1 = (*self).stra_length1;
	_tmp15_ = (_tmp14_ != NULL) ? _vala_array_dup1 (_tmp14_, _tmp14__length1) : ((gpointer) _tmp14_);
	_tmp15__length1 = _tmp14__length1;
	(*dest).stra = (_vala_mathgElmnt_array_free ((*dest).stra, (*dest).stra_length1), NULL);
	(*dest).stra = _tmp15_;
	(*dest).stra_length1 = _tmp15__length1;
	_tmp16_ = (*self).straind;
	(*dest).straind = _tmp16_;
	_tmp17_ = (*self).total;
	mathg_my_timer_copy (&_tmp17_, &_tmp18_);
	mathg_my_timer_destroy (&(*dest).total);
	(*dest).total = _tmp18_;
}